diff options
-rwxr-xr-x | redis/client.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/redis/client.py b/redis/client.py index 656df26..f7bf192 100755 --- a/redis/client.py +++ b/redis/client.py @@ -244,6 +244,12 @@ def int_or_none(response): return int(response) +def string_or_none(response): + if response is None: + return None + return nativestr(response) + + def parse_stream_list(response): if response is None: return None @@ -508,7 +514,7 @@ class Redis(object): 'CONFIG RESETSTAT': bool_ok, 'CONFIG SET': bool_ok, 'DEBUG OBJECT': parse_debug_object, - 'GEOHASH': lambda r: list(map(nativestr, r)), + 'GEOHASH': lambda r: list(map(string_or_none, r)), 'GEOPOS': lambda r: list(map(lambda ll: (float(ll[0]), float(ll[1])) if ll is not None else None, r)), |