summaryrefslogtreecommitdiff
path: root/redis/client.py
diff options
context:
space:
mode:
Diffstat (limited to 'redis/client.py')
-rw-r--r--redis/client.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/redis/client.py b/redis/client.py
index 9bf848c..f5a6283 100644
--- a/redis/client.py
+++ b/redis/client.py
@@ -500,10 +500,11 @@ class StrictRedis(object):
``start`` and ``end`` paramaters indicate which bytes to consider
"""
params = [key]
- if start and end:
+ if start is not None and end is not None:
params.append(start)
params.append(end)
- elif (start and not end) or (end and not start):
+ elif (start is not None and end is None) or \
+ (end is not None and start is None):
raise RedisError("Both start and end must be specified")
return self.execute_command('BITCOUNT', *params)