Commit ff49c5ad by James Cammarata

Make sure we're actually looping before looking at 'results' in TaskResult

Fixes #11696
parent 0fcd53e8
......@@ -40,7 +40,7 @@ class TaskResult:
return self._check_key('changed')
def is_skipped(self):
if 'results' in self._result:
if 'results' in self._result and self._task.loop:
flag = True
for res in self._result.get('results', []):
if isinstance(res, dict):
......@@ -60,7 +60,7 @@ class TaskResult:
return self._check_key('unreachable')
def _check_key(self, key):
if 'results' in self._result:
if 'results' in self._result and self._task.loop:
flag = False
for res in self._result.get('results', []):
if isinstance(res, dict):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment