summaryrefslogtreecommitdiff
path: root/redis/client.py
diff options
context:
space:
mode:
authorAndy McCurdy <andy@andymccurdy.com>2013-04-22 15:05:46 -0700
committerAndy McCurdy <andy@andymccurdy.com>2013-04-22 15:05:46 -0700
commit69b84010fbd495e210887df75fb8b56bcba41a57 (patch)
treeaaa32a1b3a30bc50665f53dcd1e1a9de166c7ef1 /redis/client.py
parent441ac15a3f8c2968ae7de0990703ee44c7d24f09 (diff)
parent99e10b1f4f789d7ad1ddbad7369225f88fc3974d (diff)
downloadredis-py-69b84010fbd495e210887df75fb8b56bcba41a57.tar.gz
Merge pull request #338 from stephan-hof/corrupted_pipeline_socket
socket gets corrupted if errors in pipeline happen
Diffstat (limited to 'redis/client.py')
-rw-r--r--redis/client.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/redis/client.py b/redis/client.py
index 0369d30..d9506e6 100644
--- a/redis/client.py
+++ b/redis/client.py
@@ -1794,8 +1794,15 @@ class BasePipeline(object):
starmap(connection.pack_command,
[args for args, options in commands]))
connection.send_packed_command(all_cmds)
- response = [self.parse_response(connection, args[0], **options)
- for args, options in commands]
+
+ response = []
+ for args, options in commands:
+ try:
+ response.append(
+ self.parse_response(connection, args[0], **options))
+ except ResponseError:
+ response.append(sys.exc_info()[1])
+
if raise_on_error:
self.raise_first_error(response)
return response