diff options
author | Zac Bristow <zbristow@codeaurora.org> | 2019-10-10 15:17:12 -0700 |
---|---|---|
committer | Andy McCurdy <andy@andymccurdy.com> | 2019-10-10 16:40:04 -0700 |
commit | e1bc3854dbce670652563d28d84bba0f333e2575 (patch) | |
tree | 10725b99e89670a04cebbd952e70060706d31518 /redis/_compat.py | |
parent | a03c12e5869469aeaf4016d75a883a1fceb992fd (diff) | |
download | redis-py-e1bc3854dbce670652563d28d84bba0f333e2575.tar.gz |
Version 3.3.103.3.10
Fix SSL regression introduced in 3.3.9
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.
Diffstat (limited to 'redis/_compat.py')
-rw-r--r-- | redis/_compat.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/redis/_compat.py b/redis/_compat.py index 39b6619..5669454 100644 --- a/redis/_compat.py +++ b/redis/_compat.py @@ -98,7 +98,7 @@ if sys.version_info[0] < 3: 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 |