changeset 4498:3b082ec6fd8b

utils: do not fail if git is not installed and has been removed from __init__.py BACKENDS
author Henrik Stuart <hg@hstuart.dk>
date Sat, 30 Aug 2014 15:19:52 +0200
parents 23cf8cad34eb
children bbf4118f6e0f
files kallithea/lib/utils.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/utils.py	Thu Aug 28 12:12:44 2014 +0000
+++ b/kallithea/lib/utils.py	Sat Aug 30 15:19:52 2014 +0200
@@ -803,6 +803,9 @@
     from kallithea.lib.vcs.conf import settings
     from distutils.version import StrictVersion
 
+    if 'git' not in BACKENDS:
+        return None
+
     stdout, stderr = GitRepository._run_git_command('--version', _bare=True,
                                                     _safe=True)