Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GitError being raised in initial `import git` #658

Merged
merged 1 commit into from Sep 28, 2017

Conversation

@terminalmage
Copy link
Contributor

@terminalmage terminalmage commented Aug 10, 2017

This catches any raise of one of the custom exceptions defined in git.exc during the imports in the dunder init, and raises an ImportError in those cases.

This is my (perhaps naïve) attempt to fix #657.

This catches any raise of one of the custom exceptions defined in
`git.exc` during the imports in the dunder init, and raises an
`ImportError` in those cases.
@Byron
Copy link
Member

@Byron Byron commented Sep 28, 2017

Thanks a ton for your contribution, and my apologies for getting to this PR that late!

This looks great!

@Byron Byron merged commit 8ef53c5 into gitpython-developers:master Sep 28, 2017
1 of 2 checks passed
1 of 2 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
terminalmage added a commit to terminalmage/GitPython that referenced this pull request Jun 1, 2018
This is related to my fix in gitpython-developers#658. Apparently, MacOS adds a git
executable that is just a stub which displays an error. This gets past
the try/except I added in gitpython-developers#658, and allows all of the GitPython
components to be imported, but since the executable is not *actually*
git, it results in an exception when ``refresh()`` attemepts to run a
``git version``.
Byron added a commit that referenced this pull request Jun 5, 2018
This is related to my fix in #658. Apparently, MacOS adds a git
executable that is just a stub which displays an error. This gets past
the try/except I added in #658, and allows all of the GitPython
components to be imported, but since the executable is not *actually*
git, it results in an exception when ``refresh()`` attemepts to run a
``git version``.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.