summaryrefslogtreecommitdiff
path: root/redis/client.py
diff options
context:
space:
mode:
authorAndy McCurdy <andy@andymccurdy.com>2017-07-19 12:14:02 -0400
committerGitHub <noreply@github.com>2017-07-19 12:14:02 -0400
commit00068762423b5ad4db883dd6ea56ff7a3d200c2b (patch)
treed396c9cdae5f24faed3db39e61f4f47b935299ee /redis/client.py
parentd6c300b39ab4c81cd97b81fcd8d25a9cde9476e7 (diff)
parent46d284dec82d7898344c5b0249b99f0fd1fde9f5 (diff)
downloadredis-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-xredis/client.py2
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)