diff options
author | Andy McCurdy <andy@andymccurdy.com> | 2018-11-14 16:13:03 -0800 |
---|---|---|
committer | Andy McCurdy <andy@andymccurdy.com> | 2018-11-14 16:13:03 -0800 |
commit | 22fa36e8709df183bc2c6d70d4a32af477359074 (patch) | |
tree | 3f877be891345800d040dd8445f1bd2fda0f303d | |
parent | 9c446d5cb1308d5e17204a04de6be3364aeab4eb (diff) | |
download | redis-py-22fa36e8709df183bc2c6d70d4a32af477359074.tar.gz |
list_or_args should always create a new list
-rwxr-xr-x | redis/client.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/redis/client.py b/redis/client.py index d8b6a3a..4bddaa8 100755 --- a/redis/client.py +++ b/redis/client.py @@ -29,13 +29,15 @@ EMPTY_RESPONSE = 'EMPTY_RESPONSE' def list_or_args(keys, args): - # returns a single list combining keys and args + # returns a single new list combining keys and args try: iter(keys) # a string or bytes instance can be iterated, but indicates # keys wasn't passed as a list if isinstance(keys, (basestring, bytes)): keys = [keys] + else: + keys = list(keys) except TypeError: keys = [keys] if args: |