summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2018-03-25 07:57:42 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2018-04-05 12:25:54 (GMT)
commit7df3a6f5e0b152207274617cdd037077aca46fc2 (patch)
tree2d092f1591916f6698792431e8ec26dcebcb24df
parentd342971a45a0405c4db60323e71ac25f1547dc0a (diff)
downloaddjango-mellon-7df3a6f5e0b152207274617cdd037077aca46fc2.zip
django-mellon-7df3a6f5e0b152207274617cdd037077aca46fc2.tar.gz
django-mellon-7df3a6f5e0b152207274617cdd037077aca46fc2.tar.bz2
python3: don't use iteritems
-rw-r--r--mellon/adapters.py4
-rw-r--r--mellon/utils.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/mellon/adapters.py b/mellon/adapters.py
index 8be35d2..7b136bd 100644
--- a/mellon/adapters.py
+++ b/mellon/adapters.py
@@ -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]
diff --git a/mellon/utils.py b/mellon/utils.py
index 6affd8a..830f711 100644
--- a/mellon/utils.py
+++ b/mellon/utils.py
@@ -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