Commit 59e9ab57 authored by legac's avatar legac Committed by LE GAC Renaud
Browse files

Update get_versions.

parent 83d2b1c5
......@@ -597,31 +597,22 @@ def get_versions():
# plugin dbui
fn = os.path.join(server_path, 'static', 'plugin_dbui', 'src', 'Dbui.js')
fi = open(fn, 'rb')
s = fi.read()
fi.close()
m = re.match("(.+ version: ')([\w._-]*)('.+)", s, re.DOTALL)
dbui = m.group(2)
with open(fn, 'rb') as fi:
s = fi.read()
m = re.match("(.+ version: ')([\w._-]*)('.+)", s, re.DOTALL)
dbui = m.group(2)
# plugin Ext JS
extjs = current.T('plugin not install')
path = os.path.join(server_path, 'static', 'plugin_extjs')
path = os.path.join(server_path, 'static', 'plugin_extjs_6')
if os.path.exists(path):
fn = os.path.join(server_path, 'static',
'plugin_extjs',
'src',
'version',
'Version.js')
fn = os.path.join(path, 'version.properties')
fi = open(fn, 'rb')
s = fi.read()
fi.close()
m = re.match(r".+ version = '(\d+(\.\d+)*)',", s, re.DOTALL)
if m:
extjs = m.group(1)
with open(fn, 'rb') as fi:
s = fi.read()
m = re.search(r"version.release=(\d+(\.\d+)*)", s)
if m:
extjs = m.group(1)
# plugin mathjax
mathjax = current.T('plugin not install')
......@@ -632,13 +623,11 @@ def get_versions():
'plugin_mathjax',
'MathJax.js')
fi = open(fn, 'rb')
s = fi.read()
fi.close()
m = re.match(r'.+MathJax.version="(\d+(\.\d+)*)";', s, re.DOTALL)
if m:
mathjax = m.group(1)
with open(fn, 'rb') as fi:
s = fi.read()
m = re.match(r'.+MathJax.version="(\d+(\.\d+)*)";', s, re.DOTALL)
if m:
mathjax = m.group(1)
# web2py
web2py = ''
......
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