changeset 4598:bfab7aa26ac9

packages.do_ensureversion: get only the numbers of the release string (ignore betaX)
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sat, 21 Feb 2009 17:14:29 +0100
parents 790e2dc06e9b
children 9275fb7a2bc2
files MoinMoin/packages.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/packages.py	Sat Feb 21 12:50:20 2009 +0100
+++ b/MoinMoin/packages.py	Sat Feb 21 17:14:29 2009 +0100
@@ -7,7 +7,7 @@
     @license: GNU GPL, see COPYING for details.
 """
 
-import os, sys
+import os, re, sys
 import zipfile
 
 from MoinMoin import config, wikiutil, caching, user
@@ -201,7 +201,8 @@
 
         from MoinMoin.version import release
         version_int = [int(x) for x in version.split(".")]
-        release = [int(x) for x in release.split(".")]
+        # use a regex here to get only the numbers of the release string (e.g. ignore betaX)
+        release = re.compile('\d+').findall(release)[0:3]
         if version_int > release:
             if lines > 0:
                 self.goto = lines