commit f52760ef4e5112d3e9d60b5223ad1971da073a81
parent b6c1b22c3536e5e1a36d9d7219511c9ada3ba780
Author: ThomasV <thomasv@gitorious>
Date: Tue, 3 Feb 2015 12:51:27 +0100
add try.. except around version comparison
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gui/qt/version_getter.py b/gui/qt/version_getter.py
@@ -75,7 +75,10 @@ class UpdateLabel(QLabel):
def compare_versions(self, version1, version2):
def normalize(v):
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):
self.setText("")