add friendly error message when the git python module can't be found

also hides the exception
Этот коммит содержится в:
Josh
2013-02-21 16:08:18 +00:00
родитель 07d0357bee
Коммит 6d037cc7a4

Просмотреть файл

@@ -15,7 +15,8 @@ def repositoryWithPath (path):
result = GitRepository(repo, path) result = GitRepository(repo, path)
except ImportError, exception: except ImportError, exception:
print "Failed to import git, please install http://gitorious.org/git-python" print "Failed to import git, please install http://gitorious.org/git-python"
raise exception print "Use sudo apt-get install python-git for Ubuntu/Debian"
print "Use sudo yum install GitPython for Fedora/RHEL/CentOS"
except: except:
result = SnapshotRepository('', path) result = SnapshotRepository('', path)