diff options
author | Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com> | 2022-01-10 06:19:40 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-10 13:19:40 +0200 |
commit | 39ce6852f56021ac9f80359f3a1e387593cfbbbb (patch) | |
tree | b7dc6e7eeb78aca8b0e681c29883c56299ab9ce0 | |
parent | 80f1d2f3f056f5e4e81796158dd29b0799f54dc7 (diff) | |
download | redis-py-39ce6852f56021ac9f80359f3a1e387593cfbbbb.tar.gz |
Set keys var otherwise variable not created (#1853)
-rw-r--r-- | redis/commands/parser.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/redis/commands/parser.py b/redis/commands/parser.py index dadf3c6..4cce800 100644 --- a/redis/commands/parser.py +++ b/redis/commands/parser.py @@ -103,6 +103,7 @@ class CommandsParser: 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']. @@ -117,6 +118,4 @@ class CommandsParser: # format example: # PUBLISH channel message keys = [args[1]] - else: - keys = None return keys |