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():
# plugin dbui
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()
m = re.match('(.+ version: ")([\w._-]*)(".+)', s, re.DOTALL)
m = re.search('(version: *")([\w\._-]*)(")', s)
dbui = m.group(2)
# plugin Ext JS
......@@ -611,7 +611,7 @@ def get_versions():
if ope(path):
fn = opj(path, "version.properties")
with open(fn, "rb") as fi:
with open(fn, "r") as fi:
s = fi.read()
m = re.search(r"version.release=(\d+(\.\d+)*)", s)
if m:
......@@ -626,9 +626,9 @@ def get_versions():
"plugin_mathjax",
"MathJax.js")
with open(fn, "rb") as fi:
with open(fn, "r") as fi:
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:
mathjax = m.group(1)
......@@ -684,7 +684,7 @@ def get_versions():
dict(code=current.request.application, version=myapp)]
li.extend(plugins)
li.sort()
li.sort(key=lambda dct: dct["code"])
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