commit:     01698b9f3f3145b3b902db9f4f5cb07f2f7c737f
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 28 23:36:47 2018 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Apr 28 23:36:47 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=01698b9f

AsynchronousLock: fix deprecated _wait usage (bug 653856)

Use _async_wait() instead of wait().

Bug: https://bugs.gentoo.org/653856

 pym/_emerge/AsynchronousLock.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/pym/_emerge/AsynchronousLock.py b/pym/_emerge/AsynchronousLock.py
index 820d047b2..5cdfd98f6 100644
--- a/pym/_emerge/AsynchronousLock.py
+++ b/pym/_emerge/AsynchronousLock.py
@@ -83,6 +83,9 @@ class AsynchronousLock(AsynchronousTask):
                return self.returncode
 
        def _wait(self):
+               """
+               Deprecated. Use _async_wait() instead.
+               """
                if self.returncode is not None:
                        return self.returncode
                self.returncode = self._imp.wait()
@@ -142,7 +145,7 @@ class _LockThread(AbstractPollTask):
        def _run_lock_cb(self):
                self._unregister()
                self.returncode = os.EX_OK
-               self.wait()
+               self._async_wait()
                return False
 
        def _cancel(self):
@@ -287,7 +290,7 @@ class _LockProcess(AbstractPollTask):
                        self._acquired = True
                        self._unregister()
                        self.returncode = os.EX_OK
-                       self.wait()
+                       self._async_wait()
 
                return True
 

Reply via email to