Skip to content
This repository was archived by the owner on Jan 24, 2023. It is now read-only.

Commit c8ce639

Browse files
author
Александр Игоревич Корочкин
committed
change output format for mget to dict
1 parent e51df3e commit c8ce639

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

redistimeseries/client.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,13 @@ def parse_get(response):
4848
return (int(response[0]), float(response[1]))
4949

5050
def parse_m_get(response):
51-
res = []
51+
res = dict()
5252
for item in response:
5353
if item[2] == []:
54-
res.append({ nativestr(item[0]) : [list_to_dict(item[1]), None, None]})
54+
res[nativestr(item[0])] = (list_to_dict(item[1]), None, None)
5555
else:
56-
res.append({ nativestr(item[0]) : [list_to_dict(item[1]),
57-
int(item[2][0]), float(item[2][1])]})
58-
56+
res[nativestr(item[0])] = (list_to_dict(item[1]),
57+
int(item[2][0]), float(item[2][1]))
5958
return res
6059

6160
def parseToList(response):

0 commit comments

Comments
 (0)