Comment 0 for bug 1536182

Revision history for this message
Roman Sokolkov (rsokolkov) wrote :

"get_patch_port_action" uses LooseVersion to compare Fuel versions,
but in case Fuel "2014.2-6.0" it works improperly

From LooseVersion standpoint:
2014.2-6.0 is greater(newer) than 2014.2.2-6.1

But in reality:
2014.2-6.0 is smaller(older) than 2014.2.2-6.1

How to reproduce:

On fuel master open python interpreter

>>> from distutils.version import LooseVersion
>>> version = "2014.2-6.0"
>>> if version < LooseVersion('2014.2.2-6.1'):
... print "Works correct for %s" % version
... else:
... print "Works incorrect for %s" % version
...
Works incorrect for 2014.2-6.0