AttributeError: LooseVersion instance has no attribute 'version'

This commit is contained in:
Dimitris Zlatanidis 2016-02-24 01:29:49 +02:00
parent 38c6d9825b
commit bb35f92416
2 changed files with 4 additions and 0 deletions

View file

@ -223,6 +223,8 @@ class BinaryInstall(object):
name = split_package(package)[0]
rep_ver = split_package(package)[1]
ins_ver = GetFromInstalled(name).version()[1:]
if not ins_ver:
ins_ver = "0"
if LooseVersion(rep_ver) < LooseVersion(ins_ver):
self.msg.template(78)
print("| Package {0} don't downgrade, "

View file

@ -359,6 +359,8 @@ class SBoInstall(object):
name = "-".join(prgnam.split("-")[:-1])
sbo_ver = prgnam.split("-")[-1]
ins_ver = GetFromInstalled(name).version()[1:]
if not ins_ver:
ins_ver = "0"
if LooseVersion(sbo_ver) < LooseVersion(ins_ver):
self.msg.template(78)
print("| Package {0} don't downgrade, "