@@ -178,7 +178,7 @@ def parse_sentinel_get_master(response, **options):
178
178
return response and (response [0 ], int (response [1 ])) or None
179
179
180
180
181
- def pairs_to_dict (response , decode_keys = False , decode_string_values = False ):
181
+ def pairs_to_dict (response , decode_keys = False , decode_string_values = False , ** options ):
182
182
"""Create a dict given a list of key/value pairs"""
183
183
if response is None :
184
184
return {}
@@ -197,7 +197,7 @@ def pairs_to_dict(response, decode_keys=False, decode_string_values=False):
197
197
return dict (zip (it , it ))
198
198
199
199
200
- def pairs_to_dict_typed (response , type_info ):
200
+ def pairs_to_dict_typed (response , type_info , ** options ):
201
201
it = iter (response )
202
202
result = {}
203
203
for key , value in zip (it , it ):
@@ -442,7 +442,7 @@ def parse_cluster_info(response, **options):
442
442
return dict (line .split (":" ) for line in response .splitlines () if line )
443
443
444
444
445
- def _parse_node_line (line ):
445
+ def _parse_node_line (line , ** options ):
446
446
line_items = line .split (" " )
447
447
node_id , addr , flags , master_id , ping , pong , epoch , connected = line .split (" " )[:8 ]
448
448
addr = addr .split ("@" )[0 ]
@@ -463,7 +463,7 @@ def _parse_node_line(line):
463
463
return addr , node_dict
464
464
465
465
466
- def _parse_slots (slot_ranges ):
466
+ def _parse_slots (slot_ranges , ** options ):
467
467
slots , migrations = [], []
468
468
for s_range in slot_ranges :
469
469
if "->-" in s_range :
@@ -640,7 +640,7 @@ def parse_acl_log(response, **options):
640
640
return data
641
641
642
642
643
- def parse_client_info (value ):
643
+ def parse_client_info (value , ** options ):
644
644
"""
645
645
Parsing client-info in ACL Log in following format.
646
646
"key1=value1 key2=value2 key3=value3"
@@ -794,7 +794,7 @@ def string_keys_to_dict(key_string, callback):
794
794
** string_keys_to_dict (
795
795
"BZPOPMAX BZPOPMIN" , lambda r : r and (r [0 ], r [1 ], float (r [2 ])) or None
796
796
),
797
- "ACL CAT" : lambda r : list (map (str_if_bytes , r )),
797
+ "ACL CAT" : lambda r , ** options : list (map (str_if_bytes , r )),
798
798
"ACL GENPASS" : str_if_bytes ,
799
799
"ACL HELP" : lambda r : list (map (str_if_bytes , r )),
800
800
"ACL LIST" : lambda r : list (map (str_if_bytes , r )),
@@ -810,7 +810,7 @@ def string_keys_to_dict(key_string, callback):
810
810
"GEOPOS" : lambda r : list (
811
811
map (lambda ll : (float (ll [0 ]), float (ll [1 ])) if ll is not None else None , r )
812
812
),
813
- "HGETALL" : lambda r : r and pairs_to_dict (r ) or {},
813
+ "HGETALL" : lambda r , ** options : r and pairs_to_dict (r , False , False , ** options ) or {},
814
814
"MEMORY STATS" : parse_memory_stats ,
815
815
"MODULE LIST" : lambda r : [pairs_to_dict (m ) for m in r ],
816
816
"RESET" : str_if_bytes ,
0 commit comments