Skip to content

Commit

Permalink
Merge pull request #1847 from Caylo/gitpython-error-1757
Browse files Browse the repository at this point in the history
better error handling for outdated gitpython module
  • Loading branch information
boegel authored Aug 4, 2016
2 parents eeca865 + a146e65 commit de753b3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions easybuild/tools/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
import tempfile
import time
import urllib2

from distutils.version import LooseVersion
from vsc.utils import fancylogger
from vsc.utils.missing import nub

Expand Down Expand Up @@ -866,7 +868,7 @@ def check_github():
git_check &= attr in dir(git)

if git_check:
check_res = "OK"
check_res = "OK (GitPython version %s)" % git.__version__
else:
check_res = "FAIL (import ok, but module doesn't provide what is expected)"
else:
Expand Down Expand Up @@ -899,7 +901,11 @@ def check_github():
else:
check_res = "OK"
elif github_user:
check_res = "FAIL (unexpected exception: %s)" % push_err
gp_ver, req_gp_ver = git.__version__, '1.0'
if LooseVersion(gp_ver) < LooseVersion(req_gp_ver):
check_res = "FAIL (GitPython version %s is too old, should be version %s or newer)" % (gp_ver, req_gp_ver)
else:
check_res = "FAIL (unexpected exception: %s)" % push_err
else:
check_res = "FAIL (no GitHub user specified)"

Expand Down

0 comments on commit de753b3

Please sign in to comment.