diff --git a/HISTORY b/HISTORY index 5aff123..8902a86 100644 --- a/HISTORY +++ b/HISTORY @@ -2,6 +2,12 @@ History ======= +0.2.6 (2018-01-04) +------------------ +* HOTFIXES +* Consider `6.x` (two digit) version on _extract_version as it is being used for tests +* Revert change on skip_upstream_condition to look straightly to CLOSED status + 0.2.5 (2018-01-03) ------------------ * Follow DUPLICATE status if BZ is CLOSED DUPLICATE diff --git a/robozilla/decorators/__init__.py b/robozilla/decorators/__init__.py index 9137e3b..529786e 100644 --- a/robozilla/decorators/__init__.py +++ b/robozilla/decorators/__init__.py @@ -15,7 +15,6 @@ BUGZILLA_ENVIRON_SAT_VERSION, BUGZILLA_ENVIRON_USER_NAME, BUGZILLA_ENVIRON_USER_PASSWORD_NAME, - BZ_CLOSED_STATUSES, BZ_OPEN_STATUSES, REDMINE_URL ) @@ -141,9 +140,13 @@ def _extract_version(regular_exp, possible_version): :param regular_exp: A `re.compile` instance :param possible_version: The string in the form sat-x.x.x or x.x.x """ - result = regular_exp.search(possible_version) - if result: - return float(result.group('version')) + try: + # EAFP to get a float direct from `6.1` like strings before regexing + return float(possible_version.strip()) + except ValueError: + result = regular_exp.search(possible_version) + if result: + return float(result.group('version')) # To get specifically the .z version as in sat-6.2.z @@ -241,7 +244,7 @@ def skip_upstream_conditions(): Verify all conditions are True, stopping evaluation when first condition is False """ - yield bug['status'] not in BZ_CLOSED_STATUSES + yield bug['status'] != 'CLOSED' whiteboard = bug.get('whiteboard', '') yield whiteboard yield 'verified in upstream' in whiteboard.lower() diff --git a/setup.py b/setup.py index 41e0762..00080ee 100755 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ setup( name='robozilla', - version='0.2.5', + version='0.2.6', packages=packages, url='https://github.com/ldjebran/robozilla', license='GNU General Public License v3 (GPLv3)',