mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Fixing bug in failed_when results introduced by c3c398c
This commit is contained in:
committed by
James Cammarata
parent
6b1ec141cb
commit
25fc0c7e1b
@@ -43,7 +43,8 @@ class TaskResult:
|
||||
return self._check_key('skipped')
|
||||
|
||||
def is_failed(self):
|
||||
if 'results' in self._result and True in [True for x in self._result['results'] if 'failed_when_result' in x]:
|
||||
if 'failed_when_result' in self._result or \
|
||||
'results' in self._result and True in [True for x in self._result['results'] if 'failed_when_result' in x]:
|
||||
return self._check_key('failed_when_result')
|
||||
else:
|
||||
return self._check_key('failed') or self._result.get('rc', 0) != 0
|
||||
|
||||
Reference in New Issue
Block a user