python3: remove various deprecated dict iteration functions
This commit is contained in:
parent
cc28e9cd69
commit
f9f358347f
|
@ -286,7 +286,7 @@ def get_attribute_kinds():
|
|||
@to_iter
|
||||
def get_choices():
|
||||
'''Produce a choice list to use in form fields'''
|
||||
for d in get_attribute_kinds().itervalues():
|
||||
for d in get_attribute_kinds().values():
|
||||
yield (d['name'], capfirst(d['label']))
|
||||
|
||||
|
||||
|
|
|
@ -269,9 +269,9 @@ def add_attributes(request, assertion, provider):
|
|||
tn.textChild = True
|
||||
atv.any = [tn]
|
||||
values.append(atv)
|
||||
for attribute, values in attributes.itervalues():
|
||||
for attribute, values in attributes.values():
|
||||
attribute.attributeValue = values
|
||||
attribute_statement.attribute = [attribute for attribute, values in attributes.itervalues()]
|
||||
attribute_statement.attribute = [attribute for attribute, values in attributes.values()]
|
||||
|
||||
|
||||
def saml2_add_attribute_values(assertion, attributes):
|
||||
|
|
|
@ -77,7 +77,7 @@ def get_mapped_attributes_flat(request):
|
|||
|
||||
|
||||
def get_ref(ref, user_info):
|
||||
if not hasattr(user_info, 'iteritems'):
|
||||
if not hasattr(user_info, 'items'):
|
||||
return None
|
||||
if '.' in ref:
|
||||
left, right = ref.split('.', 1)
|
||||
|
@ -151,7 +151,7 @@ def apply_user_info_mappings(user, user_info):
|
|||
|
||||
save_user = False
|
||||
tags = set()
|
||||
for attribute, mapping in mappings.iteritems():
|
||||
for attribute, mapping in mappings.items():
|
||||
# normalize mapping to dictionaries: if string, convert into a simple reference
|
||||
if hasattr(mapping, 'format'):
|
||||
mapping = {'ref': mapping}
|
||||
|
|
Loading…
Reference in New Issue