Skip to content

Commit

Permalink
Version 3.3.11
Browse files Browse the repository at this point in the history
check exception.args rather than exception.message. exception.message
was deprecated prior to Python 2.7 and some alternative builds have
removed it completely.
  • Loading branch information
andymccurdy committed Oct 13, 2019
1 parent e1bc385 commit 5377285
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGES
@@ -1,3 +1,6 @@
* 3.3.11
* Further fix for the SSLError -> TimeoutError mapping to work
on obscure releases of Python 2.7.
* 3.3.10
* Fixed a potential error handling bug for the SSLError -> TimeoutError
mapping introduced in 3.3.9. hanks @zbristow. #1224
Expand Down
2 changes: 1 addition & 1 deletion redis/__init__.py
Expand Up @@ -29,7 +29,7 @@ def int_or_str(value):
return value


__version__ = '3.3.10'
__version__ = '3.3.11'
VERSION = tuple(map(int_or_str, __version__.split('.')))

__all__ = [
Expand Down
3 changes: 2 additions & 1 deletion redis/_compat.py
Expand Up @@ -98,7 +98,8 @@ def wrapper(*args, **kwargs):
try:
return func(*args, **kwargs)
except _SSLError as e:
if any(x in e.message for x in _EXPECTED_SSL_TIMEOUT_MESSAGES):
message = len(e.args) == 1 and unicode(e.args[0]) or ''
if any(x in message for x in _EXPECTED_SSL_TIMEOUT_MESSAGES):
# Raise socket.timeout for compatibility with Python 3.
raise socket.timeout(*e.args)
raise
Expand Down

0 comments on commit 5377285

Please sign in to comment.