Don't let lower/upper case throw me off.

This commit is contained in:
Roland Hedberg
2015-11-16 21:12:41 +01:00
parent d40226cf0d
commit 219690b6eb
2 changed files with 10 additions and 3 deletions

View File

@@ -425,11 +425,19 @@ class AttributeConverter(object):
:return: An Attribute instance
"""
try:
_attr = self._to[attr]
except KeyError:
try:
_attr = self._to[attr.to_lower()]
except:
_attr = ''
if _attr:
return factory(saml.Attribute,
name=self._to[attr],
name=_attr,
name_format=self.name_format,
friendly_name=attr)
except KeyError:
else:
return factory(saml.Attribute, name=attr)
def from_format(self, attr):

View File

@@ -8,4 +8,3 @@ RELEASE = {
"eduPersonScopedAffiliation", "mail",
"givenName", "sn", "displayName"]
}