Skip to content

Commit 3bfdd7f

Browse files
committed
Add **options to parse functions for sentinel
1 parent 440465b commit 3bfdd7f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

redis/_parsers/helpers.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@ def parse_sentinel_state(item):
137137
return result
138138

139139

140-
def parse_sentinel_master(response):
140+
def parse_sentinel_master(response, **options):
141141
return parse_sentinel_state(map(str_if_bytes, response))
142142

143143

144-
def parse_sentinel_state_resp3(response):
144+
def parse_sentinel_state_resp3(response, **options):
145145
result = {}
146146
for key in response:
147147
try:
@@ -154,27 +154,27 @@ def parse_sentinel_state_resp3(response):
154154
return result
155155

156156

157-
def parse_sentinel_masters(response):
157+
def parse_sentinel_masters(response, **options):
158158
result = {}
159159
for item in response:
160160
state = parse_sentinel_state(map(str_if_bytes, item))
161161
result[state["name"]] = state
162162
return result
163163

164164

165-
def parse_sentinel_masters_resp3(response):
165+
def parse_sentinel_masters_resp3(response, **options):
166166
return [parse_sentinel_state(master) for master in response]
167167

168168

169-
def parse_sentinel_slaves_and_sentinels(response):
169+
def parse_sentinel_slaves_and_sentinels(response, **options):
170170
return [parse_sentinel_state(map(str_if_bytes, item)) for item in response]
171171

172172

173-
def parse_sentinel_slaves_and_sentinels_resp3(response):
174-
return [parse_sentinel_state_resp3(item) for item in response]
173+
def parse_sentinel_slaves_and_sentinels_resp3(response, **options):
174+
return [parse_sentinel_state_resp3(item, **options) for item in response]
175175

176176

177-
def parse_sentinel_get_master(response):
177+
def parse_sentinel_get_master(response, **options):
178178
return response and (response[0], int(response[1])) or None
179179

180180

0 commit comments

Comments
 (0)