python3: don't use iteritems
This commit is contained in:
parent
d342971a45
commit
7df3a6f5e0
|
@ -158,7 +158,7 @@ class DefaultAdapter(object):
|
|||
realm = utils.get_setting(idp, 'REALM')
|
||||
attribute_mapping = utils.get_setting(idp, 'ATTRIBUTE_MAPPING')
|
||||
attribute_set = False
|
||||
for field, tpl in attribute_mapping.iteritems():
|
||||
for field, tpl in attribute_mapping.items():
|
||||
try:
|
||||
value = unicode(tpl).format(realm=realm, attributes=saml_attributes, idp=idp)
|
||||
except ValueError:
|
||||
|
@ -184,7 +184,7 @@ class DefaultAdapter(object):
|
|||
if not superuser_mapping:
|
||||
return
|
||||
attribute_set = False
|
||||
for key, values in superuser_mapping.iteritems():
|
||||
for key, values in superuser_mapping.items():
|
||||
if key in saml_attributes:
|
||||
if not isinstance(values, (tuple, list)):
|
||||
values = [values]
|
||||
|
|
|
@ -114,7 +114,7 @@ def get_idps():
|
|||
|
||||
def flatten_datetime(d):
|
||||
d = d.copy()
|
||||
for key, value in d.iteritems():
|
||||
for key, value in d.items():
|
||||
if isinstance(value, datetime.datetime):
|
||||
d[key] = value.isoformat()
|
||||
return d
|
||||
|
|
Loading…
Reference in New Issue