summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Wolever <david@wolever.net>2011-07-11 16:37:17 -0400
committerDavid Wolever <david@wolever.net>2011-07-11 16:37:17 -0400
commit4fb889deed3dd1921b8e39faaf07a67dd518e84d (patch)
tree8b854979f726dfa9850414048a3414afa8cbf4fe
parent1f885302226a1a26f20d8aa76078ebde335e2bfa (diff)
downloadredis-py-4fb889deed3dd1921b8e39faaf07a67dd518e84d.tar.gz
Whoops, shouldn't be changing 'self.transaction'
Otherwise, if `.multi()` is called then `.reset()` is called, `.transaction` will remain `True` when it should be `False`
-rw-r--r--redis/client.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/redis/client.py b/redis/client.py
index 75fca53..b9b843c 100644
--- a/redis/client.py
+++ b/redis/client.py
@@ -1225,7 +1225,6 @@ class Pipeline(Redis):
if self.command_stack:
raise RedisError('Commands without an initial WATCH have already '
'been issued')
- self.transaction = True
self.explicit_transaction = True
def execute_command(self, *args, **kwargs):
@@ -1310,7 +1309,7 @@ class Pipeline(Redis):
def execute(self):
"Execute all the commands in the current pipeline"
stack = self.command_stack
- if self.transaction:
+ if self.transaction or self.explicit_transaction:
stack = [(('MULTI' ,), {})] + stack + [(('EXEC', ), {})]
execute = self._execute_transaction
else: