Skip to content

Commit

Permalink
fix execute_command() determine nodes error when no key command (#2097)
Browse files Browse the repository at this point in the history
  • Loading branch information
suxb201 authored Apr 28, 2022
1 parent 9e7e973 commit abd5aef
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion redis/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,10 @@ def set_response_callback(self, command, callback):
self.cluster_response_callbacks[command] = callback

def _determine_nodes(self, *args, **kwargs):
command = args[0]
command = args[0].upper()
if len(args) >= 2 and f"{args[0]} {args[1]}".upper() in self.command_flags:
command = f"{args[0]} {args[1]}".upper()

nodes_flag = kwargs.pop("nodes_flag", None)
if nodes_flag is not None:
# nodes flag passed by the user
Expand Down

0 comments on commit abd5aef

Please sign in to comment.