1 |
commit: 01698b9f3f3145b3b902db9f4f5cb07f2f7c737f |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Apr 28 23:36:47 2018 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 28 23:36:47 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=01698b9f |
7 |
|
8 |
AsynchronousLock: fix deprecated _wait usage (bug 653856) |
9 |
|
10 |
Use _async_wait() instead of wait(). |
11 |
|
12 |
Bug: https://bugs.gentoo.org/653856 |
13 |
|
14 |
pym/_emerge/AsynchronousLock.py | 7 +++++-- |
15 |
1 file changed, 5 insertions(+), 2 deletions(-) |
16 |
|
17 |
diff --git a/pym/_emerge/AsynchronousLock.py b/pym/_emerge/AsynchronousLock.py |
18 |
index 820d047b2..5cdfd98f6 100644 |
19 |
--- a/pym/_emerge/AsynchronousLock.py |
20 |
+++ b/pym/_emerge/AsynchronousLock.py |
21 |
@@ -83,6 +83,9 @@ class AsynchronousLock(AsynchronousTask): |
22 |
return self.returncode |
23 |
|
24 |
def _wait(self): |
25 |
+ """ |
26 |
+ Deprecated. Use _async_wait() instead. |
27 |
+ """ |
28 |
if self.returncode is not None: |
29 |
return self.returncode |
30 |
self.returncode = self._imp.wait() |
31 |
@@ -142,7 +145,7 @@ class _LockThread(AbstractPollTask): |
32 |
def _run_lock_cb(self): |
33 |
self._unregister() |
34 |
self.returncode = os.EX_OK |
35 |
- self.wait() |
36 |
+ self._async_wait() |
37 |
return False |
38 |
|
39 |
def _cancel(self): |
40 |
@@ -287,7 +290,7 @@ class _LockProcess(AbstractPollTask): |
41 |
self._acquired = True |
42 |
self._unregister() |
43 |
self.returncode = os.EX_OK |
44 |
- self.wait() |
45 |
+ self._async_wait() |
46 |
|
47 |
return True |