Skip to content

Commit

Permalink
FileDigester: eliminate _pipe_logger_exit with _async_waitpid
Browse files Browse the repository at this point in the history
Eliminate the _pipe_logger_exit method by overriding the
_async_waitpid method.

Signed-off-by: Zac Medico <zmedico@gentoo.org>
  • Loading branch information
zmedico committed Feb 29, 2020
1 parent d343bd2 commit 7e7e22d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/portage/util/_async/FileDigester.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ def _parse_digests(self, data):

self.digests = digests

def _pipe_logger_exit(self, pipe_logger):
def _async_waitpid(self):
# Ignore this event, since we want to ensure that we
# exit only after _digest_pipe_reader has reached EOF.
self._pipe_logger = None
if self._digest_pipe_reader is None:
ForkProcess._async_waitpid(self)

def _digest_pipe_reader_exit(self, pipe_reader):
self._parse_digests(pipe_reader.getvalue())
Expand Down

0 comments on commit 7e7e22d

Please sign in to comment.