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 SSL regression introduced in 3.3.9 #1224

Closed
wants to merge 1 commit into from

Conversation

zbristow
Copy link
Contributor

Pull Request check-list

  • Does $ python setup.py test pass with this change (including linting)?
  • Does travis tests pass with this change (enable it first in your forked repo and wait for the travis build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?

Description of change

The wrapper introduced to handle SSL timeout errors in Python 2.7 incorrectly assumed that instances of SSLError would always have a string as the first element in their args. The safer approach is to check the message attribute on the error.

This was caught when the ssl module raised an error that contained an errno as it's first element, which was not seen in my original testing. I've confirmed that this patch preserves the timeout handling and fixes the regression.

The wrapper introduced to handle SSL timeout errors in Python 2.7
incorrectly assumed that instances of SSLError would always have a
string as their first element. The safer approach is to check the
message attribute on the error.

Signed-off-by: Zac Bristow <zbristow@codeaurora.org>
@andymccurdy
Copy link
Contributor

Merged and pushed 3.3.10 to PyPI. Thanks!

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.

None yet

2 participants