Skip to content

Catch OSError to handle gevent monkey patching errors #1464

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

Merged

Conversation

aethanol
Copy link

@aethanol aethanol commented Jul 5, 2022

gevent.monkey.patch_all() patches stderr to be gevent._fileobjectcommon._ClosedIO object, which raises its own FileObjectClosed(IOError).
This PR robustly handles OSError which IOError / FileObjectClosed error inherits from.
Fixes #1336

@Byron Byron added this to the v3.1.28 - Bugfixes milestone Jul 6, 2022
@Byron
Copy link
Member

Byron commented Jul 6, 2022

Thanks a lot for the fix, much appreciated!

@Byron Byron merged commit f23994e into gitpython-developers:main Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

If gevent is used, it causes any error to be a gevent.FileObjectClosed(IOError)
2 participants