diff options
author | Roman Imankulov <roman.imankulov@gmail.com> | 2012-11-21 22:51:16 +0300 |
---|---|---|
committer | Roman Imankulov <roman.imankulov@gmail.com> | 2012-11-21 22:51:16 +0300 |
commit | b1a57a3e20701a9f95f3bcddd2f5f812e264d1e1 (patch) | |
tree | 947ac066768f87d8906275b5318adb17d8276e68 /redis/client.py | |
parent | c02231cc00c57e42c3750db2061d17736874d533 (diff) | |
download | redis-py-b1a57a3e20701a9f95f3bcddd2f5f812e264d1e1.tar.gz |
Fixed bug in list_or_args() helper function in python3.x
Diffstat (limited to 'redis/client.py')
-rw-r--r-- | redis/client.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/redis/client.py b/redis/client.py index 08769c7..9bf848c 100644 --- a/redis/client.py +++ b/redis/client.py @@ -5,7 +5,7 @@ import sys import warnings import time as mod_time from redis._compat import (b, izip, imap, iteritems, dictkeys, dictvalues, - basestring, long, nativestr, urlparse) + basestring, long, nativestr, urlparse, bytes) from redis.connection import ConnectionPool, UnixDomainSocketConnection from redis.exceptions import ( ConnectionError, @@ -24,9 +24,9 @@ def list_or_args(keys, args): # returns a single list combining keys and args try: iter(keys) - # a string can be iterated, but indicates + # a string or bytes instance can be iterated, but indicates # keys wasn't passed as a list - if isinstance(keys, basestring): + if isinstance(keys, (basestring, bytes)): keys = [keys] except TypeError: keys = [keys] |