From 9affd7adc64d16a7dd4733f5b90b2dfda5b1a279 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Wed, 8 Oct 2008 18:34:19 -0400 Subject: [PATCH] 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) --- SConstruct | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.30.2