commit: 54256075a4b525e86d6837a3ecf6502eb484d3a0 Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Sat Apr 28 22:25:21 2018 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Sat Apr 28 22:25:21 2018 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=54256075
AsynchronousTask: fix deprecated _wait usage (bug 653856) Make the default _start implementation call _async_wait() instead of wait(). Bug: https://bugs.gentoo.org/653856 pym/_emerge/AsynchronousTask.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pym/_emerge/AsynchronousTask.py b/pym/_emerge/AsynchronousTask.py index 7d2e6253b..4e664d00e 100644 --- a/pym/_emerge/AsynchronousTask.py +++ b/pym/_emerge/AsynchronousTask.py @@ -12,7 +12,7 @@ class AsynchronousTask(SlotObject): to public methods can be wrapped for implementing hooks such as exit listener notification. - Sublasses should call self.wait() to notify exit listeners after + Sublasses should call self._async_wait() to notify exit listeners after the task is complete and self.returncode has been set. """ @@ -51,7 +51,7 @@ class AsynchronousTask(SlotObject): def _start(self): self.returncode = os.EX_OK - self.wait() + self._async_wait() def isAlive(self): return self.returncode is None @@ -81,6 +81,9 @@ class AsynchronousTask(SlotObject): return self.returncode def _wait(self): + """ + Deprecated. Use _async_wait() instead. + """ return self.returncode def _async_wait(self):