summaryrefslogtreecommitdiff
path: root/redis/client.py
diff options
context:
space:
mode:
authorAlexander Schepanovski <suor.web@gmail.com>2012-03-03 13:21:57 +0800
committerAlexander Schepanovski <suor.web@gmail.com>2012-03-03 13:21:57 +0800
commitcfcc620321161a5b273e00444c70b12135b88e30 (patch)
treed7d3f04526a2ad6212fe73dd1f4627b14657be21 /redis/client.py
parentd7678e0f8b2196316c7f567c762c5b8471426ae1 (diff)
downloadredis-py-cfcc620321161a5b273e00444c70b12135b88e30.tar.gz
Allow empty watches in Redis.transaction()
Diffstat (limited to 'redis/client.py')
-rw-r--r--redis/client.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/redis/client.py b/redis/client.py
index aac6be9..839b156 100644
--- a/redis/client.py
+++ b/redis/client.py
@@ -240,7 +240,8 @@ class StrictRedis(object):
with self.pipeline(True, shard_hint) as pipe:
while 1:
try:
- pipe.watch(*watches)
+ if watches:
+ pipe.watch(*watches)
func(pipe)
return pipe.execute()
except WatchError: