commit:     94a37752ab21883065ed7150b902dfda2b45a5b3
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 26 07:00:18 2018 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Apr 26 07:08:54 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=94a37752

AsynchronousLock: use _async_wait() (bug 591760)

Use _async_wait() to avoid event loop recursion.

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

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

diff --git a/pym/_emerge/AsynchronousLock.py b/pym/_emerge/AsynchronousLock.py
index 0178feab2..820d047b2 100644
--- a/pym/_emerge/AsynchronousLock.py
+++ b/pym/_emerge/AsynchronousLock.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2013 Gentoo Foundation
+# Copyright 2010-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 import fcntl
@@ -70,7 +70,8 @@ class AsynchronousLock(AsynchronousTask):
 
        def _imp_exit(self, imp):
                # call exit listeners
-               self.wait()
+               self.returncode = imp.returncode
+               self._async_wait()
 
        def _cancel(self):
                if isinstance(self._imp, AsynchronousTask):
@@ -251,7 +252,7 @@ class _LockProcess(AbstractPollTask):
                                                level=logging.ERROR, 
noiselevel=-1)
                                self._unregister()
                                self.returncode = proc.returncode
-                               self.wait()
+                               self._async_wait()
                                return
 
                        if not self.cancelled and \

Reply via email to