mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 03:11:24 -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
|
@ -25,6 +25,8 @@ import subprocess
|
|||
import sys
|
||||
import time
|
||||
|
||||
from six import iteritems
|
||||
|
||||
from ansible import constants as C
|
||||
from ansible.errors import AnsibleError, AnsibleParserError, AnsibleUndefinedVariable
|
||||
from ansible.playbook.conditional import Conditional
|
||||
|
@ -289,7 +291,7 @@ class TaskExecutor:
|
|||
# And filter out any fields which were set to default(omit), and got the omit token value
|
||||
omit_token = variables.get('omit')
|
||||
if omit_token is not None:
|
||||
self._task.args = dict(filter(lambda x: x[1] != omit_token, self._task.args.iteritems()))
|
||||
self._task.args = dict(filter(lambda x: x[1] != omit_token, iteritems(self._task.args)))
|
||||
|
||||
# Read some values from the task, so that we can modify them if need be
|
||||
retries = self._task.retries
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue