Skip to content

Commit

Permalink
resolves #82
Browse files Browse the repository at this point in the history
  • Loading branch information
leifj committed Mar 31, 2016
1 parent cede1ee commit cf2043b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/pyff/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,16 @@ def _domains(entity):


def with_entity_attributes(entity, cb):

def _stext(e):
if e.text is not None:
return e.text.strip()

for ea in entity.iter("{%s}EntityAttributes" % NS['mdattr']):
for a in ea.iter("{%s}Attribute" % NS['saml']):
an = a.get('Name', None)
if a is not None:
values = [v.text.strip() for v in a.iter("{%s}AttributeValue" % NS['saml'])]
values = filter(lambda x: x is not None, [_stext(v) for v in a.iter("{%s}AttributeValue" % NS['saml'])])
cb(an, values)


Expand Down

0 comments on commit cf2043b

Please sign in to comment.