Use oslo_utils for tupleizing versions
The VersionedObjectRegistry had a helper method in it, _vers_tuple(), that converted an object's string version to a tuple. oslo_utils.version_utils does that for us, so this changes over _vers_tuple() to return version_utils's result. The inline function was left to save on horizontal space (2 calls of convert_version_to_tuple() in an inequality starts looking ugly really quick). Change-Id: I69777ed2c0486996c63ef592325a5757c0b4b0b3
This commit is contained in:
parent
6e801d1c03
commit
a912b8f661
@ -112,7 +112,7 @@ class VersionedObjectRegistry(object):
|
||||
|
||||
def _register_class(self, cls):
|
||||
def _vers_tuple(obj):
|
||||
return tuple([int(x) for x in obj.VERSION.split(".")])
|
||||
return vutils.convert_version_to_tuple(obj.VERSION)
|
||||
|
||||
_make_class_properties(cls)
|
||||
obj_name = cls.obj_name()
|
||||
|
Loading…
x
Reference in New Issue
Block a user