Une MAJ de sécurité est nécessaire sur notre version actuelle. Elle sera effectuée lundi 02/08 entre 12h30 et 13h. L'interruption de service devrait durer quelques minutes (probablement moins de 5 minutes).

Commit f9dea110 authored by RyanHerb's avatar RyanHerb
Browse files

controllers/admin.py add try/except to git rev-parse

In the debian packages all git revision information has been removed.
Therefore, for the time being we will simply display 'not versioned' if
git res-parse HEAD causes an exception
parent 741ce752
...@@ -19,9 +19,12 @@ def index(): ...@@ -19,9 +19,12 @@ def index():
p = subprocess.Popen(["df", "-h"], stdout=subprocess.PIPE) p = subprocess.Popen(["df", "-h"], stdout=subprocess.PIPE)
disk_use, err = p.communicate() disk_use, err = p.communicate()
revision = 'not versioned'
p = subprocess.Popen(["git", "rev-parse", "HEAD"], stdout=subprocess.PIPE) try:
revision, err = p.communicate() p = subprocess.Popen(["git", "rev-parse", "HEAD"], stdout=subprocess.PIPE)
revision, err = p.communicate()
d = monitor() d = monitor()
return dict(d, return dict(d,
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