summaryrefslogtreecommitdiff
path: root/redis/client.py
diff options
context:
space:
mode:
authorAndy McCurdy <andy@andymccurdy.com>2010-04-19 11:14:17 -0700
committerAndy McCurdy <andy@andymccurdy.com>2010-04-19 11:14:17 -0700
commit18f2a0253e7a9b87d84d2f7767b2d7f85f39f11f (patch)
tree91935184128dab4f8df3574660f83d8216899fea /redis/client.py
parent80c248c615db260362a4bc046d531dfaabd114dc (diff)
downloadredis-py-18f2a0253e7a9b87d84d2f7767b2d7f85f39f11f.tar.gz
Always return a set object from set-based commands. Thanks Adam Charnock for the bug report.
Diffstat (limited to 'redis/client.py')
-rw-r--r--redis/client.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/redis/client.py b/redis/client.py
index c4ea8db..ab0e9f2 100644
--- a/redis/client.py
+++ b/redis/client.py
@@ -212,7 +212,7 @@ class Redis(threading.local):
lambda r: r == 'OK'
),
string_keys_to_dict('SDIFF SINTER SMEMBERS SUNION',
- lambda r: r and set(r) or r
+ lambda r: set(r)
),
string_keys_to_dict('ZRANGE ZRANGEBYSCORE ZREVRANGE', zset_score_pairs),
{
@@ -342,8 +342,9 @@ class Redis(threading.local):
return [self._parse_response(command_name, catch_errors)
for i in range(length)]
else:
- # for pipelines, we need to read everything, including response errors.
- # otherwise we'd completely mess up the receive buffer
+ # for pipelines, we need to read everything,
+ # including response errors. otherwise we'd
+ # completely mess up the receive buffer
data = []
for i in range(length):
try: