mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -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
|
@ -24,6 +24,8 @@ import termios
|
|||
import traceback
|
||||
import textwrap
|
||||
|
||||
from six import iteritems
|
||||
|
||||
from ansible import constants as C
|
||||
from ansible.errors import AnsibleError, AnsibleOptionsError
|
||||
from ansible.plugins import module_loader
|
||||
|
@ -101,7 +103,7 @@ class DocCLI(CLI):
|
|||
if doc is not None:
|
||||
|
||||
all_keys = []
|
||||
for (k,v) in doc['options'].iteritems():
|
||||
for (k,v) in iteritems(doc['options']):
|
||||
all_keys.append(k)
|
||||
all_keys = sorted(all_keys)
|
||||
doc['option_keys'] = all_keys
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue