Skip to content

Commit

Permalink
Set keys var otherwise variable not created (#1853)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-Chen-Wang committed Jan 10, 2022
1 parent 80f1d2f commit 39ce685
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions redis/commands/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def _get_pubsub_keys(self, *args):
return None
args = [str_if_bytes(arg) for arg in args]
command = args[0].upper()
keys = None
if command == "PUBSUB":
# the second argument is a part of the command name, e.g.
# ['PUBSUB', 'NUMSUB', 'foo'].
Expand All @@ -117,6 +118,4 @@ def _get_pubsub_keys(self, *args):
# format example:
# PUBLISH channel message
keys = [args[1]]
else:
keys = None
return keys

0 comments on commit 39ce685

Please sign in to comment.