Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/util/_async/
Date: Sat, 29 Feb 2020 07:51:41
Message-Id: 1582962459.d343bd2eebbb771cb6e43d4e3add85614db6b2a6.zmedico@gentoo
1 commit: d343bd2eebbb771cb6e43d4e3add85614db6b2a6
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 29 07:32:21 2020 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 29 07:47:39 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=d343bd2e
7
8 AsyncFunction: eliminate _pipe_logger_exit with _async_waitpid
9
10 Eliminate the _pipe_logger_exit method by overriding the
11 _async_waitpid method.
12
13 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
14
15 lib/portage/util/_async/AsyncFunction.py | 5 +++--
16 1 file changed, 3 insertions(+), 2 deletions(-)
17
18 diff --git a/lib/portage/util/_async/AsyncFunction.py b/lib/portage/util/_async/AsyncFunction.py
19 index 9cfeeeada..bd7e84ea3 100644
20 --- a/lib/portage/util/_async/AsyncFunction.py
21 +++ b/lib/portage/util/_async/AsyncFunction.py
22 @@ -49,10 +49,11 @@ class AsyncFunction(ForkProcess):
23
24 return os.EX_OK
25
26 - def _pipe_logger_exit(self, pipe_logger):
27 + def _async_waitpid(self):
28 # Ignore this event, since we want to ensure that we exit
29 # only after _async_func_reader_exit has reached EOF.
30 - self._pipe_logger = None
31 + if self._async_func_reader is None:
32 + ForkProcess._async_waitpid(self)
33
34 def _async_func_reader_exit(self, pipe_reader):
35 try: