From 7419c8c86bccdb16d20eb04ed95c34e31b65486c Mon Sep 17 00:00:00 2001 From: coreycb Date: Fri, 14 Apr 2023 14:08:03 -0400 Subject: [PATCH] Fix openstack release comparison wrap (#768) Fix OpenStack release comparison wrap in os_requires_version() to ensure, for example, that 'antelope' is > 'zed'. (cherry picked from commit 6ae6d7adde8ce500d77bac6f08edff4a676dcc03) --- charmhelpers/contrib/openstack/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charmhelpers/contrib/openstack/utils.py b/charmhelpers/contrib/openstack/utils.py index 3d52eb160..83b6884b0 100644 --- a/charmhelpers/contrib/openstack/utils.py +++ b/charmhelpers/contrib/openstack/utils.py @@ -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)