[jhbuild] utils: Handle alphabetic parts of version string (GNOME bug 666425)
- From: Craig Keogh <cskeogh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] utils: Handle alphabetic parts of version string (GNOME bug 666425)
- Date: Sun, 18 Dec 2011 10:01:21 +0000 (UTC)
commit d4837f493a4263437564319a6f9d30087bff97d4
Author: Craig Keogh <cskeogh adam com au>
Date: Sun Dec 18 20:27:06 2011 +1030
utils: Handle alphabetic parts of version string (GNOME bug 666425)
jhbuild/utils/cmds.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/jhbuild/utils/cmds.py b/jhbuild/utils/cmds.py
index 2aa2f5e..585bb97 100644
--- a/jhbuild/utils/cmds.py
+++ b/jhbuild/utils/cmds.py
@@ -243,14 +243,14 @@ def has_command(cmd):
def compare_version(version, minver):
version = version.split('.')
for i, ver in enumerate(version):
- part = re.sub(r'^[^\d]*(\d+).*$', r'\1', ver)
+ part = re.sub(r'^[^\d]*(\d*).*$', r'\1', ver)
if not part:
version[i] = None
else:
version[i] = int(part)
minver = minver.split('.')
for i, ver in enumerate(minver):
- part = re.sub(r'^[^\d]*(\d+).*$', r'\1', ver)
+ part = re.sub(r'^[^\d]*(\d*).*$', r'\1', ver)
if not part:
minver[i] = None
else:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]