Skip to content

Commit f42d436

Browse files
committed
A ResourceOpts is always to added to callback execution
by Resource.parse Fixes errors like: ERROR pyff.resource Failed handling resource: MDServiceListParser.parse.<locals>._update_entities() takes 1 positional argument but 2 were given
1 parent 7ae32b3 commit f42d436

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/pyff/samlmd.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@ def parse(self, resource: Resource, content: str) -> SAMLParserInfo:
184184
resource.expire_time = expire_time
185185
info.expiration_time = str(expire_time)
186186

187-
def _extra_md(_t, info, **kwargs):
187+
def _extra_md(_t, resource_opts, **kwargs):
188188
entityID = kwargs.get('entityID')
189-
if info['alias'] != entityID:
189+
if resource_opts['alias'] != entityID:
190190
return _t
191191
sp_entities = kwargs.get('sp_entities')
192192
location = kwargs.get('location')
@@ -316,7 +316,7 @@ def parse(self, resource: Resource, content: str) -> EidasMDParserInfo:
316316
r = resource.add_child(location, child_opts)
317317

318318
# this is specific post-processing for MDSL files
319-
def _update_entities(_t, **kwargs):
319+
def _update_entities(_t, resource_opts, **kwargs):
320320
_country_code = kwargs.get('country_code')
321321
_hide_from_discovery = kwargs.get('hide_from_discovery')
322322
for e in iter_entities(_t):

0 commit comments

Comments
 (0)