@@ -53,12 +53,9 @@ async def get_keys(
5353 except KeyError :
5454 # try to split the command name and to take only the main command
5555 # e.g. 'memory' for 'memory usage'
56- cmd_name_split = args [0 ].split ()
57- cmd_name = cmd_name_split [0 ]
58- if cmd_name in self .commands :
59- # save the splitted command to args
60- args = cmd_name_split + list (args [1 :])
61- else :
56+ args = args [0 ].split () + list (args [1 :])
57+ cmd_name = args [0 ]
58+ if cmd_name not in self .commands :
6259 # We'll try to reinitialize the commands cache, if the engine
6360 # version has changed, the commands may not be current
6461 await self .initialize (redis_conn )
@@ -84,14 +81,8 @@ async def get_keys(
8481 async def _get_moveable_keys (
8582 self , redis_conn : "ClusterNode" , * args
8683 ) -> Optional [List [str ]]:
87- pieces = []
88- cmd_name = args [0 ]
89- # The command name should be splitted into separate arguments,
90- # e.g. 'MEMORY USAGE' will be splitted into ['MEMORY', 'USAGE']
91- pieces = pieces + cmd_name .split ()
92- pieces = pieces + list (args [1 :])
9384 try :
94- keys = await redis_conn .execute_command ("COMMAND GETKEYS" , * pieces )
85+ keys = await redis_conn .execute_command ("COMMAND GETKEYS" , * args )
9586 except ResponseError as e :
9687 message = e .__str__ ()
9788 if (
0 commit comments