summaryrefslogtreecommitdiff
path: root/redis/client.py
diff options
context:
space:
mode:
authorNick Gaya <nicholasgaya+github@gmail.com>2020-03-05 01:33:55 -0800
committerAndy McCurdy <andy@andymccurdy.com>2020-03-10 17:10:04 -0700
commit07fec7e18996b6b3b4f30ec9636b88c9b287ece5 (patch)
tree8fea4af74c1aba7cd6260cb4eb62ed35948e9e64 /redis/client.py
parent81d76657385fc81548e5eaca4781c0e6b214ea16 (diff)
downloadredis-py-07fec7e18996b6b3b4f30ec9636b88c9b287ece5.tar.gz
Don't send DISCARD after ExecAbortError in pipeline
The `EXECABORT` error type was added in Redis 2.6.5 and is returned from an `EXEC` command to indicate that the transaction was aborted due to an invalid command. It is not necessary to call `DISCARD` after this error, and doing so causes a "DISCARD without MULTI" error.
Diffstat (limited to 'redis/client.py')
-rwxr-xr-xredis/client.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/redis/client.py b/redis/client.py
index 10ba979..19707b2 100755
--- a/redis/client.py
+++ b/redis/client.py
@@ -3898,8 +3898,6 @@ class Pipeline(Redis):
try:
response = self.parse_response(connection, '_')
except ExecAbortError:
- if self.explicit_transaction:
- self.immediate_execute_command('DISCARD')
if errors:
raise errors[0][1]
raise sys.exc_info()[1]