Commit f9dea110 authored by RyanHerb's avatar RyanHerb

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():
p = subprocess.Popen(["df", "-h"], stdout=subprocess.PIPE)
disk_use, err = p.communicate()
p = subprocess.Popen(["git", "rev-parse", "HEAD"], stdout=subprocess.PIPE)
revision, err = p.communicate()
revision = 'not versioned'
try:
p = subprocess.Popen(["git", "rev-parse", "HEAD"], stdout=subprocess.PIPE)
revision, err = p.communicate()
except:
pass
d = monitor()
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