mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00: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:
@@ -19,6 +19,7 @@
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from six import iteritems
|
||||
from jinja2.utils import missing
|
||||
|
||||
__all__ = ['AnsibleJ2Vars']
|
||||
@@ -46,7 +47,7 @@ class AnsibleJ2Vars:
|
||||
self._extras = extras
|
||||
self._locals = dict()
|
||||
if isinstance(locals, dict):
|
||||
for key, val in locals.iteritems():
|
||||
for key, val in iteritems(locals):
|
||||
if key[:2] == 'l_' and val is not missing:
|
||||
self._locals[key[2:]] = val
|
||||
|
||||
|
||||
Reference in New Issue
Block a user