From cfcc620321161a5b273e00444c70b12135b88e30 Mon Sep 17 00:00:00 2001 From: Alexander Schepanovski Date: Sat, 3 Mar 2012 13:21:57 +0800 Subject: [PATCH] Allow empty watches in Redis.transaction() --- redis/client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/redis/client.py b/redis/client.py index aac6be9278..839b15669f 100644 --- a/redis/client.py +++ b/redis/client.py @@ -240,7 +240,8 @@ def transaction(self, func, *watches, **kwargs): 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: