avoid reporting incorrect info in is_success()
This commit is contained in:
parent
73ebc0c98f
commit
f81c369724
1 changed files with 2 additions and 4 deletions
|
|
@ -218,11 +218,9 @@ class TaskWatcher(object):
|
|||
state = koji.TASK_STATES[self.info['state']]
|
||||
return (state in ['CLOSED','CANCELED','FAILED'])
|
||||
|
||||
def is_success(self, ignore_child=True):
|
||||
def is_success(self):
|
||||
if self.info is None:
|
||||
return False
|
||||
if ignore_child and self.level != 0:
|
||||
return True
|
||||
state = koji.TASK_STATES[self.info['state']]
|
||||
return (state == 'CLOSED')
|
||||
|
||||
|
|
@ -299,7 +297,7 @@ def watch_tasks(session, tasklist, quiet=False, poll_interval=60):
|
|||
# task is done and state just changed
|
||||
if not quiet:
|
||||
display_tasklist_status(tasks)
|
||||
if not task.is_success():
|
||||
if task.level == 0 and not task.is_success():
|
||||
rv = 1
|
||||
for child in session.getTaskChildren(task_id):
|
||||
child_id = child['id']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue