From 6598f98ba8fc2d058a1a5d948b48f81a2b052776 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 6 Jul 2010 17:45:18 +0100 Subject: bitbake: runqueue: Allow passing of success/failure handlers to runqueue_process_waitpid() Signed-off-by: Richard Purdie --- bitbake/lib/bb/runqueue.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bitbake/lib/bb') diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 31978d49b..f9acd9ca2 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py @@ -956,7 +956,7 @@ class RunQueue: self.build_pipes[pipe].read() if self.stats.active > 0: - if self.runqueue_process_waitpid() is None: + if self.runqueue_process_waitpid(self.task_complete, self.task_fail) is None: return continue @@ -975,7 +975,7 @@ class RunQueue: self.state = runQueueComplete return - def runqueue_process_waitpid(self): + def runqueue_process_waitpid(self, success, failure): """ Return none is there are no processes awaiting result collection, otherwise collect the process exit codes and close the information pipe. @@ -988,9 +988,9 @@ class RunQueue: self.build_pipes[result[0]].close() del self.build_pipes[result[0]] if result[1] != 0: - self.task_fail(task, result[1]) + failure(task, result[1]) else: - self.task_complete(task) + success(task) self.stats.taskCompleted() bb.event.fire(runQueueTaskCompleted(task, self.stats, self), self.cfgData) @@ -1016,7 +1016,7 @@ class RunQueue: try: while self.stats.active > 0: bb.event.fire(runQueueExitWait(self.stats.active), self.cfgData) - if self.runqueue_process_waitpid() is None: + if self.runqueue_process_waitpid(self.task_complete, self.task_fail) is None: return except: self.finish_runqueue_now() -- cgit v1.2.3