Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/exe/webui
diff options
context:
space:
mode:
authorjim <jim@38b22f21-9aea-0310-abfc-843a9883df58>2007-09-03 03:27:27 (GMT)
committer jim <jim@38b22f21-9aea-0310-abfc-843a9883df58>2007-09-03 03:27:27 (GMT)
commit829242a38333ab01082a546c61245ec216492f8a (patch)
tree4a2937aa0b2b4aff83ed40930c04672721af3908 /exe/webui
parent45fb4a6b08648e7bf769563580e16455a6268a23 (diff)
change Linux browser version check to handle Firefox versions x.y in addition
to x.y.z.a git-svn-id: https://exe.svn.sourceforge.net/svnroot/exe/trunk@3259 38b22f21-9aea-0310-abfc-843a9883df58
Diffstat (limited to 'exe/webui')
-rwxr-xr-xexe/webui/browser.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/exe/webui/browser.py b/exe/webui/browser.py
index ba7fbbc..5b96b1c 100755
--- a/exe/webui/browser.py
+++ b/exe/webui/browser.py
@@ -2,7 +2,7 @@
# ===========================================================================
# eXe
# Copyright 2004-2006, University of Auckland
-# Copyright 2007 eXe Project, New Zealand Tertiary Education Commission
+# Copyright 2004-2007 eXe Project, New Zealand Tertiary Education Commission
#
# This module is for the TwiSteD web server.
#
@@ -41,8 +41,7 @@ def setVersionInPrefs(version_string, profile_dir):
prefs = open(prefs, 'wt')
for line in lines:
if line.find("extensions.lastAppVersion") > -1:
- line = re.sub(r'\d+\.\d+\.\d+\.\d+',
- version_string, line, 1)
+ line = re.sub(r'\d+(\.\d+)+', version_string, line, 1)
log.info(u"updated browser version in prefs: " + line)
prefs.write(line)
except IOError:
@@ -51,7 +50,7 @@ def setVersionInPrefs(version_string, profile_dir):
def setBrowserVersion(browserPath, profile_dir):
version = os.popen(browserPath + " -v", "r").read()
log.info(u"Firefox version: " + version)
- vs = re.search(r"(?P<vs>\d+\.\d+\.\d+\.\d+)", version)
+ vs = re.search(r"Firefox\s+(?P<vs>\d+(\.\d+)+)", version)
if vs:
setVersionInPrefs(vs.group('vs'), profile_dir)