diff options
author | Andy McCurdy <andy@andymccurdy.com> | 2017-07-24 09:14:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-24 09:14:11 -0400 |
commit | 0adba8081b0caf5150cdc2f5ca0111207eb130a0 (patch) | |
tree | 4954d7ae1b0c6d36c4457ea4f4d53607c30c26d5 | |
parent | 00068762423b5ad4db883dd6ea56ff7a3d200c2b (diff) | |
parent | 111327976ccb1e97ff2dfcc803a9505f5fe91577 (diff) | |
download | redis-py-0adba8081b0caf5150cdc2f5ca0111207eb130a0.tar.gz |
Merge pull request #882 from a1exwang/master
[bugfix] Fix srandmember(key, 0) returns 1 element bug
-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 1a8589d..92095de 100755 --- a/redis/client.py +++ b/redis/client.py @@ -1644,7 +1644,7 @@ class StrictRedis(object): memebers of set ``name``. Note this is only available when running Redis 2.6+. """ - args = number and [number] or [] + args = (number is not None) and [number] or [] return self.execute_command('SRANDMEMBER', name, *args) def srem(self, name, *values): |