From 6019d0ca01bb687db775dd030a1c2215f14b7af3 Mon Sep 17 00:00:00 2001 From: David Lindquist Date: Mon, 13 May 2013 15:46:32 -0700 Subject: [PATCH] Check for existance of git-python before checking it's version attribute --- salt/fileserver/gitfs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/fileserver/gitfs.py b/salt/fileserver/gitfs.py index aeaa20e7c5..64320c02e8 100644 --- a/salt/fileserver/gitfs.py +++ b/salt/fileserver/gitfs.py @@ -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'