Skip to content
Snippets Groups Projects
Commit a15b1a55 authored by legac's avatar legac
Browse files

More robust version of the helper function get_version

parent 9e7ad4c3
No related branches found
No related tags found
No related merge requests found
......@@ -441,10 +441,16 @@ def get_versions():
# web2py
web2py = ''
m = re.match('\d+\.\d+\.\d+', current.request.env.web2py_version)
if m:
web2py = m.group()
val = current.request.env.web2py_version
if isinstance(val, str):
m = re.match('\d+\.\d+\.\d+', val)
if m:
web2py = m.group()
elif isinstance(val, (tuple, list)):
li = [str(el) for el in val if isinstance(el, int)]
web2py = '.'.join(li)
# version of the application
myapp = current.T("unknown")
......
--------------------------------- CHANGE LOG ----------------------------------
HEAD
- More robst version of the helper function get_version.
0.4.11.1 (Mar 2013)
- Deploy the javascript statement "use strict" (JSLINT)
- Upgrade to run with alias table.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment