mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 19:31:26 -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
|
@ -34,6 +34,7 @@ import subprocess
|
|||
import cgi
|
||||
import warnings
|
||||
from jinja2 import Environment, FileSystemLoader
|
||||
from six import iteritems
|
||||
|
||||
from ansible.utils import module_docs
|
||||
from ansible.utils.vars import merge_hash
|
||||
|
@ -292,7 +293,7 @@ def process_module(module, options, env, template, outputname, module_map, alias
|
|||
del doc['version_added']
|
||||
|
||||
if 'options' in doc and doc['options']:
|
||||
for (k,v) in doc['options'].iteritems():
|
||||
for (k,v) in iteritems(doc['options']):
|
||||
# don't show version added information if it's too old to be called out
|
||||
if 'version_added' in doc['options'][k] and too_old(doc['options'][k]['version_added']):
|
||||
del doc['options'][k]['version_added']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue