Check for existance of git-python before checking it's version attribute

This commit is contained in:
David Lindquist 2013-05-13 15:46:32 -07:00
parent 4ea70b9b85
commit 6019d0ca01

View File

@ -38,12 +38,12 @@ def __virtual__():
return False
if not 'git' in __opts__['fileserver_backend']:
return False
if not git.__version__ > '0.3.0':
return False
if not HAS_GIT:
log.error('Git fileserver backend is enabled in configuration but '
'could not be loaded, is git-python installed?')
return False
if not git.__version__ > '0.3.0':
return False
return 'git'