From 6fa403ee9bad84ea1a5a4522f743c3c48c5e4e87 Mon Sep 17 00:00:00 2001 From: Alan Mitchell Date: Thu, 6 Apr 2017 20:25:15 -0800 Subject: [PATCH] Needed to be in Correct Directory for Git command. --- bmsapp/view_util.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bmsapp/view_util.py b/bmsapp/view_util.py index 6f9c688..5db321a 100644 --- a/bmsapp/view_util.py +++ b/bmsapp/view_util.py @@ -2,6 +2,7 @@ Helper functions for the views in this BMS application. ''' import importlib +import os from subprocess import check_output from django.template import loader from django.templatetags.static import static @@ -321,7 +322,8 @@ def version_date_string(): """ ver_date = '' try: - result = check_output(['git', 'log', '-n1']) + dir_git = os.path.dirname(__file__) + result = check_output('cd %s; git log -n1' % dir_git, shell=True) for lin in result.splitlines(): if lin.startswith('Date:'): ver_date = lin[5:].strip() -- GitLab