Skip to content

Commit 39ce685

Browse files
Set keys var otherwise variable not created (#1853)
1 parent 80f1d2f commit 39ce685

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

redis/commands/parser.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ def _get_pubsub_keys(self, *args):
103103
return None
104104
args = [str_if_bytes(arg) for arg in args]
105105
command = args[0].upper()
106+
keys = None
106107
if command == "PUBSUB":
107108
# the second argument is a part of the command name, e.g.
108109
# ['PUBSUB', 'NUMSUB', 'foo'].
@@ -117,6 +118,4 @@ def _get_pubsub_keys(self, *args):
117118
# format example:
118119
# PUBLISH channel message
119120
keys = [args[1]]
120-
else:
121-
keys = None
122121
return keys

0 commit comments

Comments
 (0)