diff options
author | Roey Prat <roey.prat@redislabs.com> | 2018-10-28 10:05:53 +0200 |
---|---|---|
committer | Roey Prat <roey.prat@redislabs.com> | 2018-10-28 14:13:42 +0200 |
commit | 8d006b6f1b29424cdae72c1c0d49079de45d2962 (patch) | |
tree | 5528867867698840b54c0cb6e2c131a494932ecc | |
parent | 44942c7c5254bfaf2304299e82a49ef548bd31cb (diff) | |
download | redis-py-8d006b6f1b29424cdae72c1c0d49079de45d2962.tar.gz |
XCLAIM renaming param to param_value, and adding param_name to pieces
-rwxr-xr-x | redis/client.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/redis/client.py b/redis/client.py index 78b8302..faa57dd 100755 --- a/redis/client.py +++ b/redis/client.py @@ -2088,17 +2088,17 @@ class StrictRedis(object): pieces.extend(list(message_ids)) optional_ints = {idle: 'idle', time: 'time', retrycount: 'retrycount'} - for param, param_name in optional_ints.items(): - if param is not None: - if not isinstance(param, (int, long)): + for param_value, param_name in optional_ints.items(): + if param_value is not None: + if not isinstance(param_value, (int, long)): raise RedisError("XCLAIM {} must be an integer" .format(param_name)) - pieces.append(str(param)) + pieces.extend((param_name, str(param_value))) optional_bools = {force: 'force', justid: 'justid'} - for param, param_name in optional_bools.items(): - if param: - if not isinstance(param, bool): + for param_value, param_name in optional_bools.items(): + if param_value: + if not isinstance(param_value, bool): raise RedisError("XCLAIM {} must be a boolean" .format(param_name)) pieces.append(param_name.upper()) |