koji-wrapper: Handle failed subtasks
If a subtask fails, we can't ask about it's results as that would raise an exception. We can safely assume that since the parent succeeded, any failed child is actually allowed to fail. Fixes: #641 Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
d3dd7aa7ce
commit
81b71b9ed3
@ -354,6 +354,11 @@ class KojiWrapper(object):
|
||||
if child_task['method'] not in ['createImage', 'createLiveMedia', 'createAppliance']:
|
||||
continue
|
||||
|
||||
if child_task['state'] != koji.TASK_STATES['CLOSED']:
|
||||
# The subtask is failed, which can happen with the can_fail
|
||||
# option. Let's ignore it then.
|
||||
continue
|
||||
|
||||
is_scratch = child_task['request'][-1].get('scratch', False)
|
||||
task_result = self.koji_proxy.getTaskResult(child_task['id'])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user