summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2008-10-08 18:34:19 -0400
committerAli Saidi <saidi@eecs.umich.edu>2008-10-08 18:34:19 -0400
commit9affd7adc64d16a7dd4733f5b90b2dfda5b1a279 (patch)
treee93e8311cea3e50775d269fcb3c2265a7ee146ec
parentfef5a4f49cdeb568590f96007494962e0dd3ce6b (diff)
downloadgem5-9affd7adc64d16a7dd4733f5b90b2dfda5b1a279.tar.xz
Scons: Update compare_versions() to ignore trailing charecters after an int. This is a fix for a mysql version number that includes a (E.g. 5.0.51a)
-rw-r--r--SConstruct2
1 files changed, 1 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index f91cb35fe..260c025bd 100644
--- a/SConstruct
+++ b/SConstruct
@@ -91,7 +91,7 @@ def compare_versions(v1, v2):
if isinstance(v, (list,tuple)):
return v
elif isinstance(v, str):
- return map(int, v.split('.'))
+ return map(lambda x: int(re.match('\d+', x).group()), v.split('.'))
else:
raise TypeError