Skip to content

Commit abd5aef

Browse files
authored
fix execute_command() determine nodes error when no key command (#2097)
1 parent 9e7e973 commit abd5aef

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

redis/cluster.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,10 @@ def set_response_callback(self, command, callback):
867867
self.cluster_response_callbacks[command] = callback
868868

869869
def _determine_nodes(self, *args, **kwargs):
870-
command = args[0]
870+
command = args[0].upper()
871+
if len(args) >= 2 and f"{args[0]} {args[1]}".upper() in self.command_flags:
872+
command = f"{args[0]} {args[1]}".upper()
873+
871874
nodes_flag = kwargs.pop("nodes_flag", None)
872875
if nodes_flag is not None:
873876
# nodes flag passed by the user

0 commit comments

Comments
 (0)