mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fixing bug in failed_when results introduced by c3c398c
This commit is contained in:
parent
6b1ec141cb
commit
25fc0c7e1b
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue