commit: 5ca431566538965927a33565c222c8994ad288d5 Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Sun Apr 29 00:24:21 2018 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Sun Apr 29 00:24:21 2018 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=5ca43156
SubProcess._poll(): fix deprecated wait() usage (bug 653856) Use _async_wait() instead of wait(). Bug: https://bugs.gentoo.org/653856 pym/_emerge/SubProcess.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pym/_emerge/SubProcess.py b/pym/_emerge/SubProcess.py index f684c5a22..13cf9d361 100644 --- a/pym/_emerge/SubProcess.py +++ b/pym/_emerge/SubProcess.py @@ -40,7 +40,7 @@ class SubProcess(AbstractPollTask): if retval[0] == 0: return None self._set_returncode(retval) - self.wait() + self._async_wait() return self.returncode def _cancel(self): @@ -62,7 +62,9 @@ class SubProcess(AbstractPollTask): self.returncode is None def _wait(self): - + """ + Deprecated. Use _async_wait() instead. + """ if self.returncode is not None: return self.returncode @@ -121,6 +123,9 @@ class SubProcess(AbstractPollTask): self._async_wait() def _waitpid_loop(self): + """ + Deprecated. Use _async_waitpid() instead. + """ source_id = self.scheduler.child_watch_add( self.pid, self._waitpid_cb) try: