diff options
author | Aaron Yang <ycr_aaron@foxmail.com> | 2018-08-23 16:05:15 +0800 |
---|---|---|
committer | Aaron Yang <ycr_aaron@foxmail.com> | 2018-08-23 16:05:15 +0800 |
commit | a1ee3df167b6d9f2f3c16414ace5c8e900b9adfd (patch) | |
tree | 0c05c3f37641b0cd4a1d682f6328e1b753e24733 | |
parent | 61293ff5672f467f552e1f25b9efb490a90983c0 (diff) | |
download | redis-py-a1ee3df167b6d9f2f3c16414ace5c8e900b9adfd.tar.gz |
fix retry for PubSub
-rwxr-xr-x | redis/client.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/redis/client.py b/redis/client.py index 5f252e4..85803cc 100755 --- a/redis/client.py +++ b/redis/client.py @@ -2411,7 +2411,8 @@ class PubSub(object): return command(*args) except (ConnectionError, TimeoutError) as e: connection.disconnect() - if not connection.retry_on_timeout and isinstance(e, TimeoutError): + if (not connection.retry_on_timeout and + isinstance(e, TimeoutError)): raise # Connect manually here. If the Redis server is down, this will # fail and raise a ConnectionError as desired. |