Skip to content

Commit

Permalink
Fix openstack release comparison wrap (#768)
Browse files Browse the repository at this point in the history
Fix OpenStack release comparison wrap in os_requires_version()
to ensure, for example, that 'antelope' is > 'zed'.

(cherry picked from commit 6ae6d7a)
  • Loading branch information
coreycb authored and freyes committed Jun 9, 2023
1 parent 837a8b5 commit 7419c8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion charmhelpers/contrib/openstack/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ def os_requires_version(ostack_release, pkg):
def wrap(f):
@wraps(f)
def wrapped_f(*args):
if os_release(pkg) < ostack_release:
if CompareOpenStackReleases(os_release(pkg)) < ostack_release:
raise Exception("This hook is not supported on releases"
" before %s" % ostack_release)
f(*args)
Expand Down

0 comments on commit 7419c8c

Please sign in to comment.