Skip to content

Commit

Permalink
Fix case where text is None.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Barrett committed Feb 11, 2016
1 parent b727312 commit a00abf5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/onelogin/saml2/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,10 @@ def get_attributes(self):
for attr in attribute_node.iterchildren('{%s}AttributeValue' % OneLogin_Saml2_Constants.NSMAP['saml']):
# Remove any whitespace (which may be present where attributes are
# nested inside NameID children).
text = attr.text.strip()
if text:
values.append(text)
if attr.text:
text = attr.text.strip()
if text:
values.append(text)

# Parse any nested NameID children
for nameid in attr.iterchildren('{%s}NameID' % OneLogin_Saml2_Constants.NSMAP['saml']):
Expand Down

0 comments on commit a00abf5

Please sign in to comment.