Skip to content

Commit

Permalink
HOTFIXES 0.2.6 (#39)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
rochacbruno authored and renzon committed Jan 5, 2018
1 parent d2665e9 commit 49f9a3f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
6 changes: 6 additions & 0 deletions HISTORY
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 8 additions & 5 deletions robozilla/decorators/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)',
Expand Down

0 comments on commit 49f9a3f

Please sign in to comment.