Fix version comparison and update tests.

This commit is contained in:
Andris Raugulis
2016-10-05 04:09:50 +03:00
parent 407ddbd7ea
commit 262c65b7be
2 changed files with 48 additions and 3 deletions

View File

@ -506,7 +506,7 @@ class SSH(object):
if other is None:
return 1
if isinstance(other, self.__class__):
other = '{0}{1}'.format(other.version, other.patch)
other = '{0}{1}'.format(other.version, other.patch or '')
else:
other = str(other)
mx = re.match(r'^([\d\.]+\d+)(.*)$', other)