mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-07 00:44:01 -07:00
Removed dict.iteritems() in modules. (#18859)
This is for py3 compatibility, addressed in #18506
This commit is contained in:
parent
4b27d08643
commit
ef391a11ec
99 changed files with 251 additions and 250 deletions
|
@ -518,12 +518,12 @@ def main():
|
|||
authentication=authentication)
|
||||
|
||||
changed = False
|
||||
proposed = dict((k, v) for k, v in args.iteritems() if v is not None)
|
||||
proposed = dict((k, v) for k, v in args.items() if v is not None)
|
||||
|
||||
existing = get_ntp_auth_info(key_id, module)
|
||||
end_state = existing
|
||||
|
||||
delta = dict(set(proposed.iteritems()).difference(existing.iteritems()))
|
||||
delta = dict(set(proposed.items()).difference(existing.items()))
|
||||
|
||||
commands = []
|
||||
if state == 'present':
|
||||
|
@ -553,7 +553,7 @@ def main():
|
|||
clie = get_exception()
|
||||
module.fail_json(msg=str(clie) + ": " + cmds)
|
||||
end_state = get_ntp_auth_info(key_id, module)
|
||||
delta = dict(set(end_state.iteritems()).difference(existing.iteritems()))
|
||||
delta = dict(set(end_state.items()).difference(existing.items()))
|
||||
if delta or (len(existing) != len(end_state)):
|
||||
changed = True
|
||||
if 'configure' in cmds:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue