Skip to content

Commit 15f8858

Browse files
committed
collect trust profile display names
1 parent fa6a122 commit 15f8858

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/pyff/samlmd.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,13 @@ def discojson_sp(e, global_trust_info=None, global_md_sources=None):
938938
strict = profile_el.attrib.get('strict', True)
939939
sp['profiles'][name] = {'strict': strict, 'entity': [], 'entities': []}
940940

941-
fallback_handler = tinfo_el.find('.//{%s}FallbackHandler' % NS['ti'])
941+
display_name = {}
942+
for dname in profile_el.iterfind('.//{%s}DisplayName' % NS['ti']):
943+
lang = dname.attrib['{%s}lang' % NS['xml']]
944+
display_name[lang] = dname.text
945+
sp['profiles'][name]['display_name'] = display_name
946+
947+
fallback_handler = profile_el.find('.//{%s}FallbackHandler' % NS['ti'])
942948
if fallback_handler is not None:
943949
prof = fallback_handler.attrib.get('profile', 'href')
944950
handler = fallback_handler.text

0 commit comments

Comments
 (0)