Assumes that task is the final task of this composite task.
Calls _default_exit() and sets self.returncode to the task's
returncode and sets self._current_task to None.
-
- Subclasses can use this as a generic final task exit callback.
-
"""
self._default_exit(task)
self._current_task = None
self.returncode = task.returncode
return self.returncode
+ def _default_final_exit(self, task):
+ """
+ This calls _final_exit() and then wait().
+
+ Subclasses can use this as a generic final task exit callback.
+
+ """
+ self._final_exit(task)
+ return self.wait()
+
def _start_task(self, task, exit_handler):
"""
Register exit handler for the given task, set it
pkg=pkg, phase=phase, scheduler=scheduler,
settings=settings, tree=tree))
- self._start_task(ebuild_phases, self._final_exit)
+ self._start_task(ebuild_phases, self._default_final_exit)
class EbuildPhase(SubProcess):
self._install_task = build
self._start_task(build, self._ebuild_exit)
- self.wait()
return
elif pkg.type_name == "binary":
scheduler=scheduler, world_atom=world_atom)
self._install_task = binpkg
- self._start_task(binpkg, self._final_exit)
- self.wait()
+ self._start_task(binpkg, self._default_final_exit)
return
def _ebuild_exit(self, build):