Commit f9dea110 authored by RyanHerb's avatar RyanHerb
Browse files

controllers/ 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) p = subprocess.Popen(["git", "rev-parse", "HEAD"], stdout=subprocess.PIPE)
revision, err = p.communicate() 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