diff options
author | Andy McCurdy <andy@andymccurdy.com> | 2019-07-29 13:37:33 -0700 |
---|---|---|
committer | Andy McCurdy <andy@andymccurdy.com> | 2019-07-29 13:37:33 -0700 |
commit | f30787856749ce577078e5de12b814ea01736999 (patch) | |
tree | 318c708dadca7f92180166551dbb6729ae1def75 /redis/connection.py | |
parent | e897c174483275fcb333e02bf36353a6afee44b4 (diff) | |
download | redis-py-f30787856749ce577078e5de12b814ea01736999.tar.gz |
Version 3.3.2, SSL Blocking Exceptions don't use errno.EWOULDBLOCK3.3.2
Ref #1197
Diffstat (limited to 'redis/connection.py')
-rwxr-xr-x | redis/connection.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/redis/connection.py b/redis/connection.py index 5ec2f2e..46d3b20 100755 --- a/redis/connection.py +++ b/redis/connection.py @@ -1,6 +1,5 @@ from __future__ import unicode_literals from distutils.version import StrictVersion -from errno import EWOULDBLOCK from itertools import chain from time import time import io @@ -36,6 +35,8 @@ except ImportError: ssl_available = False if ssl_available: + # note that when using nonblocking sockets over ssl, the ssl module + # raises its own exceptions rather than the normal BlockingIOError blocking_exceptions = ( BlockingIOError, ssl.SSLWantReadError, @@ -184,7 +185,7 @@ class SocketBuffer(object): # blocking error, simply return False indicating that # there's no data to be read. otherwise raise the # original exception. - if raise_on_timeout or ex.errno != EWOULDBLOCK: + if raise_on_timeout: raise return False except socket.timeout: @@ -413,7 +414,7 @@ class HiredisParser(BaseParser): # blocking error, simply return False indicating that # there's no data to be read. otherwise raise the # original exception. - if raise_on_timeout or ex.errno != EWOULDBLOCK: + if raise_on_timeout: raise return False except socket.timeout: |