summaryrefslogtreecommitdiff
path: root/redis/client.py
diff options
context:
space:
mode:
authorRoey Prat <roey.prat@redislabs.com>2018-10-28 10:22:19 +0200
committerRoey Prat <roey.prat@redislabs.com>2018-10-28 14:13:42 +0200
commitd2d3b2243d3516c71c7feef4bf466352d07ead41 (patch)
tree0f1411c696537073d3c3632e077fe7dc8c324c27 /redis/client.py
parent492adbcf1183322edcf9a834ee3636622a109025 (diff)
downloadredis-py-d2d3b2243d3516c71c7feef4bf466352d07ead41.tar.gz
stream_list should reuse pairs_to_dict
Diffstat (limited to 'redis/client.py')
-rwxr-xr-xredis/client.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/redis/client.py b/redis/client.py
index b982979..908a63e 100755
--- a/redis/client.py
+++ b/redis/client.py
@@ -235,15 +235,7 @@ def int_or_none(response):
def stream_list(response):
if response is None:
return None
- result = []
- for r in response:
- kv_pairs = r[1]
- kv_dict = dict()
- while len(kv_pairs) > 1:
- kv_dict[kv_pairs.pop()] = kv_pairs.pop()
- result.append((r[0], kv_dict))
-
- return result
+ return [(r[0], pairs_to_dict(r[1])) for r in response]
def parse_recursive_dict(response):