summaryrefslogtreecommitdiff
path: root/redis/asyncio/parser.py
diff options
context:
space:
mode:
authorFalk <falk-h@users.noreply.github.com>2022-06-19 03:37:12 +0200
committerGitHub <noreply@github.com>2022-06-19 04:37:12 +0300
commit41b537d9195ee8e4ab897951ba6563b367c28b7d (patch)
tree84e7d6c87c9c7ddf2ff173dcfd7330e0fff87c1f /redis/asyncio/parser.py
parentbedf3c82a55b4b67eed93f686cb17e82f7ab19cd (diff)
downloadredis-py-41b537d9195ee8e4ab897951ba6563b367c28b7d.tar.gz
Uppercase commands in CommandsParser.get_keys (#2236)
Diffstat (limited to 'redis/asyncio/parser.py')
-rw-r--r--redis/asyncio/parser.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/redis/asyncio/parser.py b/redis/asyncio/parser.py
index 9518c3f..5faf8f8 100644
--- a/redis/asyncio/parser.py
+++ b/redis/asyncio/parser.py
@@ -55,14 +55,14 @@ class CommandsParser:
# try to split the command name and to take only the main command
# e.g. 'memory' for 'memory usage'
args = args[0].split() + list(args[1:])
- cmd_name = args[0]
+ cmd_name = args[0].upper()
if cmd_name not in self.commands:
# We'll try to reinitialize the commands cache, if the engine
# version has changed, the commands may not be current
await self.initialize()
if cmd_name not in self.commands:
raise RedisError(
- f"{cmd_name.upper()} command doesn't exist in Redis commands"
+ f"{cmd_name} command doesn't exist in Redis commands"
)
command = self.commands[cmd_name]