Skip to content

Commit

Permalink
Merge pull request #878 from Mec-iS/patch-1
Browse files Browse the repository at this point in the history
Improve if statement throwing KeyError
  • Loading branch information
andymccurdy committed Jul 19, 2017
2 parents d6c300b + 46d284d commit 0006876
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redis/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0006876

Please sign in to comment.