We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3740d80 commit 69c5e07Copy full SHA for 69c5e07
src/saml2/mdstore.py
@@ -815,14 +815,18 @@ def entity_attributes(self, entity_id):
815
:type entity_id: string
816
:rtype: dict
817
"""
818
- ext = self.__getitem__(entity_id)["extensions"]
819
res = {}
+ try:
820
+ ext = self.__getitem__(entity_id)["extensions"]
821
+ except KeyError:
822
+ return res
823
for elem in ext["extension_elements"]:
824
if elem["__class__"] == ENTITYATTRIBUTES:
825
for attr in elem["attribute"]:
826
if attr["name"] not in res:
827
res[attr["name"]] = []
- res[attr["name"]] += [v["text"] for v in attr["attribute_value"]]
828
+ res[attr["name"]] += [v["text"] for v in attr[
829
+ "attribute_value"]]
830
return res
831
832
def bindings(self, entity_id, typ, service):
0 commit comments