Commit 9addc9cc authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update helper/get_versions.

parent 7d4d7f95
...@@ -600,9 +600,9 @@ def get_versions(): ...@@ -600,9 +600,9 @@ def get_versions():
# plugin dbui # plugin dbui
fn = opj(server_path, "static", "plugin_dbui", "src", "Dbui.js") fn = opj(server_path, "static", "plugin_dbui", "src", "Dbui.js")
with open(fn, "rb") as fi: with open(fn, "r") as fi:
s = fi.read() s = fi.read()
m = re.match('(.+ version: ")([\w._-]*)(".+)', s, re.DOTALL) m = re.search('(version: *")([\w\._-]*)(")', s)
dbui = m.group(2) dbui = m.group(2)
# plugin Ext JS # plugin Ext JS
...@@ -611,7 +611,7 @@ def get_versions(): ...@@ -611,7 +611,7 @@ def get_versions():
if ope(path): if ope(path):
fn = opj(path, "version.properties") fn = opj(path, "version.properties")
with open(fn, "rb") as fi: with open(fn, "r") as fi:
s = fi.read() s = fi.read()
m = re.search(r"version.release=(\d+(\.\d+)*)", s) m = re.search(r"version.release=(\d+(\.\d+)*)", s)
if m: if m:
...@@ -626,9 +626,9 @@ def get_versions(): ...@@ -626,9 +626,9 @@ def get_versions():
"plugin_mathjax", "plugin_mathjax",
"MathJax.js") "MathJax.js")
with open(fn, "rb") as fi: with open(fn, "r") as fi:
s = fi.read() s = fi.read()
m = re.match(r'.+MathJax.version="(\d+(\.\d+)*)";', s, re.DOTALL) m = re.search(r'MathJax.version="(\d+(\.\d+)*)";', s)
if m: if m:
mathjax = m.group(1) mathjax = m.group(1)
...@@ -684,7 +684,7 @@ def get_versions(): ...@@ -684,7 +684,7 @@ def get_versions():
dict(code=current.request.application, version=myapp)] dict(code=current.request.application, version=myapp)]
li.extend(plugins) li.extend(plugins)
li.sort() li.sort(key=lambda dct: dct["code"])
return li return li
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment