summaryrefslogtreecommitdiff
path: root/redis/client.py
diff options
context:
space:
mode:
Diffstat (limited to 'redis/client.py')
-rwxr-xr-xredis/client.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/redis/client.py b/redis/client.py
index c0ac25e..93da07c 100755
--- a/redis/client.py
+++ b/redis/client.py
@@ -3703,6 +3703,14 @@ class Pipeline(Redis):
def __len__(self):
return len(self.command_stack)
+ def __nonzero__(self):
+ "Pipeline instances should always evaluate to True on Python 2.7"
+ return True
+
+ def __bool__(self):
+ "Pipeline instances should always evaluate to True on Python 3+"
+ return True
+
def reset(self):
self.command_stack = []
self.scripts = set()