From d53017eea8cad572b470d50433eb3115040c68e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20J=C3=A4ckel?= Date: Wed, 28 Nov 2012 18:02:33 +0100 Subject: [PATCH] Get git commit id also in detached head mode. --- openslides/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openslides/__init__.py b/openslides/__init__.py index 80ed9bb5e..b4ae8af8c 100644 --- a/openslides/__init__.py +++ b/openslides/__init__.py @@ -40,7 +40,7 @@ def get_git_commit_id(): """ try: git_head = open('.git/HEAD', 'r').read().rstrip() - if True: #starts with 'ref: ' + if git_head[:5] == 'ref: ': git_commit_id = open('.git/%s' % git_head[5:], 'r').read().rstrip() else: git_commit_id = git_head