better error handling for outdated gitpython module#1847
Merged
boegel merged 7 commits intoeasybuilders:developfrom Aug 4, 2016
Merged
better error handling for outdated gitpython module#1847boegel merged 7 commits intoeasybuilders:developfrom
boegel merged 7 commits intoeasybuilders:developfrom
Conversation
| check_res = "OK" | ||
| elif github_user: | ||
| check_res = "FAIL (unexpected exception: %s)" % push_err | ||
| if sys.modules['git'].__version__ < "1.0.0": |
Member
There was a problem hiding this comment.
please use LooseVersion when comparing versions
also, just use git.__version__?
if LooseVersion(git.__version__) < LooseVersion('1.0'):Did you verify whether things (should) work with GitPython 1.0 and up?
Contributor
Author
There was a problem hiding this comment.
Yup, verified that. Everything above 1.0 works.
| elif github_user: | ||
| check_res = "FAIL (unexpected exception: %s)" % push_err | ||
| if LooseVersion(git.__version__) < LooseVersion('1.0'): | ||
| check_res = "FAIL (outdated gitpython module, try updating first)" |
Member
There was a problem hiding this comment.
can you clarify 'outdated' in the error, i.e. mention what the minimal version is? and also mention the what version was found
something like
check_res = "FAIL (GitPython version %s is too old, should be version %s or newer)" % (git.__version__, req_gp_ver)| req_gp_ver = '1.0' | ||
| if LooseVersion(git.__version__) < LooseVersion(req_gp_ver): | ||
| check_res = "FAIL (GitPython version %s is too old, should be version %s or newer)" % (git.__version__, | ||
| req_gp_ver) |
Member
There was a problem hiding this comment.
bleh on the wrapping here...
maybe like this?
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)
Member
|
Going in, thanks @Caylo! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ref #1757