aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2018-04-28 15:25:21 -0700
committerZac Medico <zmedico@gentoo.org>2018-04-28 15:25:21 -0700
commit54256075a4b525e86d6837a3ecf6502eb484d3a0 (patch)
tree1102a528309f354011c758554f7e6a351f6a099b
parentMirrorDistTask: fix deprecated _wait usage (bug 653856) (diff)
downloadportage-54256075.tar.gz
portage-54256075.tar.bz2
portage-54256075.zip
AsynchronousTask: fix deprecated _wait usage (bug 653856)
Make the default _start implementation call _async_wait() instead of wait(). Bug: https://bugs.gentoo.org/653856
-rw-r--r--pym/_emerge/AsynchronousTask.py7
1 files 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):