diff options
Diffstat (limited to 'redis/client.py')
-rwxr-xr-x | redis/client.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/redis/client.py b/redis/client.py index 03a86ab..0ab8081 100755 --- a/redis/client.py +++ b/redis/client.py @@ -1,5 +1,5 @@ from __future__ import with_statement -from itertools import chain, starmap +from itertools import chain import datetime import sys import warnings @@ -2413,9 +2413,7 @@ class BasePipeline(object): def _execute_transaction(self, connection, commands, raise_on_error): cmds = chain([(('MULTI', ), {})], commands, [(('EXEC', ), {})]) - all_cmds = chain.from_iterable( - starmap(connection.pack_command, - [args for args, options in cmds])) + all_cmds = connection.pack_commands([args for args, _ in cmds]) connection.send_packed_command(all_cmds) errors = [] @@ -2476,9 +2474,7 @@ class BasePipeline(object): def _execute_pipeline(self, connection, commands, raise_on_error): # build up all commands into a single request to increase network perf - all_cmds = chain.from_iterable( - starmap(connection.pack_command, - [args for args, options in commands])) + all_cmds = connection.pack_commands([args for args, _ in commands]) connection.send_packed_command(all_cmds) response = [] |