Removed dict.iteritems() in modules. (#18859)

This is for py3 compatibility, addressed in #18506
This commit is contained in:
Andrea Tartaglia 2016-12-12 23:16:23 +00:00 committed by Toshio Kuratomi
parent 4b27d08643
commit ef391a11ec
99 changed files with 251 additions and 250 deletions

View file

@ -335,7 +335,7 @@ def state_present(module, existing, proposed, candidate):
proposed_commands = apply_key_map(PARAM_TO_COMMAND_KEYMAP, proposed)
existing_commands = apply_key_map(PARAM_TO_COMMAND_KEYMAP, existing)
for key, value in proposed_commands.iteritems():
for key, value in proposed_commands.items():
if value is True:
commands.append(key)
@ -392,11 +392,11 @@ def main():
existing = invoke('get_existing', module, args)
end_state = existing
proposed_args = dict((k, v) for k, v in module.params.iteritems()
proposed_args = dict((k, v) for k, v in module.params.items()
if v is not None and k in args)
proposed = {}
for key, value in proposed_args.iteritems():
for key, value in proposed_args.items():
if key != 'interface':
if str(value).lower() == 'default':
value = PARAM_TO_DEFAULT_KEYMAP.get(key)