commit:     d343bd2eebbb771cb6e43d4e3add85614db6b2a6
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 29 07:32:21 2020 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Feb 29 07:47:39 2020 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=d343bd2e

AsyncFunction: eliminate _pipe_logger_exit with _async_waitpid

Eliminate the _pipe_logger_exit method by overriding the
_async_waitpid method.

Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 lib/portage/util/_async/AsyncFunction.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/portage/util/_async/AsyncFunction.py 
b/lib/portage/util/_async/AsyncFunction.py
index 9cfeeeada..bd7e84ea3 100644
--- a/lib/portage/util/_async/AsyncFunction.py
+++ b/lib/portage/util/_async/AsyncFunction.py
@@ -49,10 +49,11 @@ class AsyncFunction(ForkProcess):
 
                return os.EX_OK
 
-       def _pipe_logger_exit(self, pipe_logger):
+       def _async_waitpid(self):
                # Ignore this event, since we want to ensure that we exit
                # only after _async_func_reader_exit has reached EOF.
-               self._pipe_logger = None
+               if self._async_func_reader is None:
+                       ForkProcess._async_waitpid(self)
 
        def _async_func_reader_exit(self, pipe_reader):
                try:

Reply via email to