@@ -228,7 +228,7 @@ def lock(self, name, timeout=None, sleep=0.1):
228
228
229
229
#### COMMAND EXECUTION AND PROTOCOL PARSING ####
230
230
def execute_command (self , * args , ** options ):
231
- command_name = options . get ( 'command_name' , args [0 ])
231
+ command_name = args [0 ]
232
232
subscription_command = command_name in self .SUBSCRIPTION_COMMANDS
233
233
if self .subscribed and not subscription_command :
234
234
raise PubSubError ("Cannot issue commands other than SUBSCRIBE and "
@@ -1298,7 +1298,7 @@ def _execute_transaction(self, commands):
1298
1298
for r , cmd in izip (response , commands ):
1299
1299
if not isinstance (r , Exception ):
1300
1300
args , options = cmd
1301
- command_name = options . get ( 'command_name' , args [0 ])
1301
+ command_name = args [0 ]
1302
1302
if command_name in self .RESPONSE_CALLBACKS :
1303
1303
r = self .RESPONSE_CALLBACKS [command_name ](r , ** options )
1304
1304
data .append (r )
@@ -1309,8 +1309,7 @@ def _execute_pipeline(self, commands):
1309
1309
all_cmds = '' .join (starmap (self .connection .pack_command ,
1310
1310
[args for args , options in commands ]))
1311
1311
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 )
1314
1313
for args , options in commands ]
1315
1314
1316
1315
def execute (self ):
0 commit comments