mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +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:
@@ -20,6 +20,8 @@ from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from six.moves import queue
|
||||
from six import iteritems
|
||||
|
||||
import multiprocessing
|
||||
import os
|
||||
import signal
|
||||
@@ -157,7 +159,7 @@ class ResultProcess(multiprocessing.Process):
|
||||
# if this task is registering facts, do that now
|
||||
item = result_item.get('item', None)
|
||||
if result._task.action in ('set_fact', 'include_vars'):
|
||||
for (key, value) in result_item['ansible_facts'].iteritems():
|
||||
for (key, value) in iteritems(result_item['ansible_facts']):
|
||||
self._send_result(('set_host_var', result._host, result._task, item, key, value))
|
||||
else:
|
||||
self._send_result(('set_host_facts', result._host, result._task, item, result_item['ansible_facts']))
|
||||
|
||||
Reference in New Issue
Block a user