Skip to content

Commit 1685fd2

Browse files
committed
we don't need the command_name overriding just yet
1 parent 4d6320a commit 1685fd2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

redis/client.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def lock(self, name, timeout=None, sleep=0.1):
228228

229229
#### COMMAND EXECUTION AND PROTOCOL PARSING ####
230230
def execute_command(self, *args, **options):
231-
command_name = options.get('command_name', args[0])
231+
command_name = args[0]
232232
subscription_command = command_name in self.SUBSCRIPTION_COMMANDS
233233
if self.subscribed and not subscription_command:
234234
raise PubSubError("Cannot issue commands other than SUBSCRIBE and "
@@ -1298,7 +1298,7 @@ def _execute_transaction(self, commands):
12981298
for r, cmd in izip(response, commands):
12991299
if not isinstance(r, Exception):
13001300
args, options = cmd
1301-
command_name = options.get('command_name', args[0])
1301+
command_name = args[0]
13021302
if command_name in self.RESPONSE_CALLBACKS:
13031303
r = self.RESPONSE_CALLBACKS[command_name](r, **options)
13041304
data.append(r)
@@ -1309,8 +1309,7 @@ def _execute_pipeline(self, commands):
13091309
all_cmds = ''.join(starmap(self.connection.pack_command,
13101310
[args for args, options in commands]))
13111311
self.connection.send_packed_command(all_cmds)
1312-
return [self.parse_response(
1313-
options.get('command_name', args[0]), **options)
1312+
return [self.parse_response(args[0], **options)
13141313
for args, options in commands]
13151314

13161315
def execute(self):

0 commit comments

Comments
 (0)