add try.. except around version comparison
This commit is contained in:
@@ -75,7 +75,10 @@ class UpdateLabel(QLabel):
|
|||||||
def compare_versions(self, version1, version2):
|
def compare_versions(self, version1, version2):
|
||||||
def normalize(v):
|
def normalize(v):
|
||||||
return [int(x) for x in re.sub(r'(\.0+)*$','', v).split(".")]
|
return [int(x) for x in re.sub(r'(\.0+)*$','', v).split(".")]
|
||||||
return cmp(normalize(version1), normalize(version2))
|
try:
|
||||||
|
return cmp(normalize(version1), normalize(version2))
|
||||||
|
except:
|
||||||
|
return 0
|
||||||
|
|
||||||
def ignore_this_version(self):
|
def ignore_this_version(self):
|
||||||
self.setText("")
|
self.setText("")
|
||||||
|
|||||||
Reference in New Issue
Block a user