From eb296c82de1fc38a81323928b2ce482b627b43c8 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 5 Jul 2008 14:02:13 +0000 Subject: Call _wait_hook() from poll() if the wait call occurs there. svn path=/main/trunk/; revision=10946 --- pym/_emerge/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pym') diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index eefa68921..d25358faa 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -1489,7 +1489,8 @@ class AsynchronousTask(SlotObject): def _wait_hook(self): """ - Call this method before returning from wait. This hook is + Call this method after the task completes, just before returning + the returncode from wait() or poll(). This hook is used to trigger exit listeners when the returncode first becomes available. """ @@ -1574,6 +1575,7 @@ class SubProcess(AsynchronousTask): if retval == (0, 0): return None self._set_returncode(retval) + self._wait_hook() return self.returncode def cancel(self): -- cgit v1.2.3-1-g7c22