diff --git a/CHANGES b/CHANGES index 62493fbaa9..1aee24b0fe 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +* 3.3.10 + * Fixed a potential error handling bug for the SSLError -> TimeoutError + mapping introduced in 3.3.9. hanks @zbristow. #1224 * 3.3.9 * Mapped Python 2.7 SSLError to TimeoutError where appropriate. Timeouts should now consistently raise TimeoutErrors on Python 2.7 for both diff --git a/redis/__init__.py b/redis/__init__.py index 2835a4210c..cfe7078455 100644 --- a/redis/__init__.py +++ b/redis/__init__.py @@ -29,7 +29,7 @@ def int_or_str(value): return value -__version__ = '3.3.9' +__version__ = '3.3.10' VERSION = tuple(map(int_or_str, __version__.split('.'))) __all__ = [ diff --git a/redis/_compat.py b/redis/_compat.py index 39b6619ba7..566945479d 100644 --- a/redis/_compat.py +++ b/redis/_compat.py @@ -98,7 +98,7 @@ def wrapper(*args, **kwargs): try: return func(*args, **kwargs) except _SSLError as e: - if any(x in e.args[0] for x in _EXPECTED_SSL_TIMEOUT_MESSAGES): + if any(x in e.message for x in _EXPECTED_SSL_TIMEOUT_MESSAGES): # Raise socket.timeout for compatibility with Python 3. raise socket.timeout(*e.args) raise