diff options
author | Andy McCurdy <andy@andymccurdy.com> | 2017-07-19 12:14:02 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-19 12:14:02 -0400 |
commit | 00068762423b5ad4db883dd6ea56ff7a3d200c2b (patch) | |
tree | d396c9cdae5f24faed3db39e61f4f47b935299ee /redis/client.py | |
parent | d6c300b39ab4c81cd97b81fcd8d25a9cde9476e7 (diff) | |
parent | 46d284dec82d7898344c5b0249b99f0fd1fde9f5 (diff) | |
download | redis-py-00068762423b5ad4db883dd6ea56ff7a3d200c2b.tar.gz |
Merge pull request #878 from Mec-iS/patch-1
Improve if statement throwing KeyError
Diffstat (limited to 'redis/client.py')
-rwxr-xr-x | redis/client.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/redis/client.py b/redis/client.py index 98764ca..1a8589d 100755 --- a/redis/client.py +++ b/redis/client.py @@ -207,7 +207,7 @@ def zset_score_pairs(response, **options): If ``withscores`` is specified in the options, return the response as a list of (value, score) pairs """ - if not response or not options['withscores']: + if not response or not options.get('withscores'): return response score_cast_func = options.get('score_cast_func', float) it = iter(response) |