diff options
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 93564bc..307f3cc 100644 --- a/redis/_compat.py +++ b/redis/_compat.py @@ -24,7 +24,7 @@ if sys.version_info[0] < 3 or (sys.version_info[0] == 3 and except InterruptedError as e: # Python 2 does not define InterruptedError, instead # try to catch an OSError with errno == EINTR == 4. - if hasattr(e, 'errno') and e.errno == getattr(errno, 'EINTR', 4): + if getattr(e, 'errno', None) == getattr(errno, 'EINTR', 4): continue raise |