From ac25e02e2d7a7b3105f3961e6cd854b8a572e7f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20J=C3=A4ckel?= Date: Wed, 31 Oct 2012 14:38:06 +0100 Subject: [PATCH] Catch another IOError in get_version() --- openslides/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/openslides/__init__.py b/openslides/__init__.py index 17d119cf0..69d7f23e4 100644 --- a/openslides/__init__.py +++ b/openslides/__init__.py @@ -31,11 +31,10 @@ def get_version(version=None): sub = mapping[version[3]] + str(version[4]) try: git_head_path = '.git/' + open('.git/HEAD', 'r').read()[5:].rstrip() - except IOError: - git_commit_id = 'unknown' - else: import os git_commit_id = open(os.path.abspath(git_head_path), 'r').read().rstrip() + except IOError: + git_commit_id = 'unknown' sub = '%s commit %s' % (sub, git_commit_id) else: sub = ''