summaryrefslogtreecommitdiff
path: root/redis
diff options
context:
space:
mode:
authordvora-h <67596500+dvora-h@users.noreply.github.com>2021-12-22 11:52:03 +0200
committerGitHub <noreply@github.com>2021-12-22 11:52:03 +0200
commit1bcdf2d7835fad8e7a782fccea9cbbec745bcf24 (patch)
tree7617a46233bcd4276a3379796857e7767ff08826 /redis
parentf99744b9049be78bbbe558fbc8ac62d94ac62a4d (diff)
downloadredis-py-1bcdf2d7835fad8e7a782fccea9cbbec745bcf24.tar.gz
Fixing exception in listen (#1823)
Diffstat (limited to 'redis')
-rwxr-xr-xredis/client.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/redis/client.py b/redis/client.py
index ae4fae2..16ffbb0 100755
--- a/redis/client.py
+++ b/redis/client.py
@@ -1530,6 +1530,8 @@ class PubSub:
with a message handler, the handler is invoked instead of a parsed
message being returned.
"""
+ if response is None:
+ return None
message_type = str_if_bytes(response[0])
if message_type == "pmessage":
message = {