1 |
commit: 54256075a4b525e86d6837a3ecf6502eb484d3a0 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Apr 28 22:25:21 2018 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 28 22:25:21 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=54256075 |
7 |
|
8 |
AsynchronousTask: fix deprecated _wait usage (bug 653856) |
9 |
|
10 |
Make the default _start implementation call _async_wait() instead |
11 |
of wait(). |
12 |
|
13 |
Bug: https://bugs.gentoo.org/653856 |
14 |
|
15 |
pym/_emerge/AsynchronousTask.py | 7 +++++-- |
16 |
1 file changed, 5 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/pym/_emerge/AsynchronousTask.py b/pym/_emerge/AsynchronousTask.py |
19 |
index 7d2e6253b..4e664d00e 100644 |
20 |
--- a/pym/_emerge/AsynchronousTask.py |
21 |
+++ b/pym/_emerge/AsynchronousTask.py |
22 |
@@ -12,7 +12,7 @@ class AsynchronousTask(SlotObject): |
23 |
to public methods can be wrapped for implementing |
24 |
hooks such as exit listener notification. |
25 |
|
26 |
- Sublasses should call self.wait() to notify exit listeners after |
27 |
+ Sublasses should call self._async_wait() to notify exit listeners after |
28 |
the task is complete and self.returncode has been set. |
29 |
""" |
30 |
|
31 |
@@ -51,7 +51,7 @@ class AsynchronousTask(SlotObject): |
32 |
|
33 |
def _start(self): |
34 |
self.returncode = os.EX_OK |
35 |
- self.wait() |
36 |
+ self._async_wait() |
37 |
|
38 |
def isAlive(self): |
39 |
return self.returncode is None |
40 |
@@ -81,6 +81,9 @@ class AsynchronousTask(SlotObject): |
41 |
return self.returncode |
42 |
|
43 |
def _wait(self): |
44 |
+ """ |
45 |
+ Deprecated. Use _async_wait() instead. |
46 |
+ """ |
47 |
return self.returncode |
48 |
|
49 |
def _async_wait(self): |