Call _wait_hook() from poll() if the wait call occurs there.
authorZac Medico <zmedico@gentoo.org>
Sat, 5 Jul 2008 14:02:13 +0000 (14:02 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 5 Jul 2008 14:02:13 +0000 (14:02 -0000)
svn path=/main/trunk/; revision=10946

pym/_emerge/__init__.py

index eefa68921aac87f07e8eabff2254456198c5e4a8..d25358faa2ebb7d05ad0924a8e9c4bc765ddef54 100644 (file)
@@ -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):