diff options
author | Konstantin Merenkov <kmerenkov@gmail.com> | 2010-04-17 01:12:32 +0800 |
---|---|---|
committer | Andy McCurdy <andy@andymccurdy.com> | 2010-04-17 01:25:16 +0800 |
commit | 80c248c615db260362a4bc046d531dfaabd114dc (patch) | |
tree | f0b87a08d1ac705fff480b1bf7905c1b8031a6cd /redis/client.py | |
parent | 8b58178a946d7a846f4ff8f4b5d75243554bf8ec (diff) | |
download | redis-py-80c248c615db260362a4bc046d531dfaabd114dc.tar.gz |
HGETALL returns empty dict instead of None when there's no key in redis
Diffstat (limited to 'redis/client.py')
-rw-r--r-- | redis/client.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/redis/client.py b/redis/client.py index a696e2b..c4ea8db 100644 --- a/redis/client.py +++ b/redis/client.py @@ -219,7 +219,7 @@ class Redis(threading.local): 'BGREWRITEAOF': lambda r: \ r == 'Background rewriting of AOF file started', 'BGSAVE': lambda r: r == 'Background saving started', - 'HGETALL': lambda r: r and pairs_to_dict(r) or None, + 'HGETALL': lambda r: r and pairs_to_dict(r) or {}, 'INFO': parse_info, 'LASTSAVE': timestamp_to_datetime, 'PING': lambda r: r == 'PONG', |