diff options
author | pfreixes <pfreixes@gmail.com> | 2016-06-14 23:59:19 +0200 |
---|---|---|
committer | pfreixes <pfreixes@gmail.com> | 2016-06-14 23:59:19 +0200 |
commit | dd99ea7fc37b883a6bd2d618d7c99cae7e93ca7e (patch) | |
tree | 46ee9abc1a8959bca540bf3a43c14afd1664520f /redis | |
parent | 934ff423c9503373f31a173fcb00591769ce7d40 (diff) | |
download | redis-py-dd99ea7fc37b883a6bd2d618d7c99cae7e93ca7e.tar.gz |
Fixed issues regarding Python3
Diffstat (limited to 'redis')
-rwxr-xr-x | redis/client.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/redis/client.py b/redis/client.py index 941bc85..a8aaa64 100755 --- a/redis/client.py +++ b/redis/client.py @@ -322,7 +322,7 @@ def parse_georadius_generic(response, **options): if not options['withdist'] and not options['withcoord']\ and not options['withhash']: # just a bunch of places - return [str(r) for r in response_list] + return [nativestr(r) for r in response_list] cast = { 'withdist': float, @@ -332,10 +332,10 @@ def parse_georadius_generic(response, **options): # zip all output results with each casting functino to get # the properly native Python value. - f = [str] + f = [nativestr] f += [cast[o] for o in ['withdist', 'withhash', 'withcoord'] if options[o]] return [ - map(lambda fv: fv[0](fv[1]), zip(f, r)) for r in response_list + list(map(lambda fv: fv[0](fv[1]), zip(f, r))) for r in response_list ] @@ -444,7 +444,7 @@ class StrictRedis(object): 'CLUSTER SLAVES': parse_cluster_nodes, 'GEOPOS': lambda r: list(map(lambda ll: (float(ll[0]), float(ll[1])), r)), - 'GEOHASH': lambda r: list(map(str, r)), + 'GEOHASH': lambda r: list(map(nativestr, r)), 'GEORADIUS': parse_georadius_generic, 'GEORADIUSBYMEMBER': parse_georadius_generic, } |