mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -07:00
Replace .iteritems() with six.iteritems()
Replace .iteritems() with six.iteritems() everywhere except in module_utils (because there's no 'six' on the remote host). And except in lib/ansible/galaxy/data/metadata_template.j2, because I'm not sure six is available there.
This commit is contained in:
parent
9e1bc434c7
commit
823677b490
28 changed files with 81 additions and 41 deletions
|
@ -25,6 +25,8 @@ import pipes
|
|||
import random
|
||||
import re
|
||||
|
||||
from six import iteritems
|
||||
|
||||
from ansible import constants as C
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.playbook.attribute import Attribute, FieldAttribute
|
||||
|
@ -308,7 +310,7 @@ class PlayContext(Base):
|
|||
|
||||
# finally, use the MAGIC_VARIABLE_MAPPING dictionary to update this
|
||||
# connection info object with 'magic' variables from the variable list
|
||||
for (attr, variable_names) in MAGIC_VARIABLE_MAPPING.iteritems():
|
||||
for (attr, variable_names) in iteritems(MAGIC_VARIABLE_MAPPING):
|
||||
for variable_name in variable_names:
|
||||
if variable_name in variables:
|
||||
setattr(new_info, attr, variables[variable_name])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue