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

Wrap BaseSSLError into SSLError during response reads #1939

Merged
merged 2 commits into from Aug 31, 2020

Conversation

sethmlarson
Copy link
Member

Closes #1764

pquentin
pquentin previously approved these changes Aug 29, 2020
Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess writing a test for this is going to be complicated and not worth it?

@sethmlarson
Copy link
Member Author

I'll create a small test case :)

@sethmlarson sethmlarson force-pushed the wrap-sslerror-error-catcher branch 2 times, most recently from dda3f13 to 7c27e0d Compare August 31, 2020 01:27
@sethmlarson sethmlarson merged commit bb862a2 into urllib3:master Aug 31, 2020
@sethmlarson sethmlarson deleted the wrap-sslerror-error-catcher branch August 31, 2020 15:35
@@ -443,9 +444,8 @@ def _error_catcher(self):
except BaseSSLError as e:
# FIXME: Is there a better way to differentiate between SSLErrors?
if "read operation timed out" not in str(e): # Defensive:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove that Defensive pragma? Without that, I think we won't get coverage information for that condition.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah, I'll remove that :) Nice catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SSLError
2 participants