diff options
author | Zac Medico <zmedico@gentoo.org> | 2012-12-30 17:01:59 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-12-30 17:04:27 -0800 |
commit | a3100be184ba1cac2f672f0a1cadcf01690c6d3f (patch) | |
tree | 53fa53cd147e24c7230daa71ddd7821fd6803108 /pym/_emerge/PackageUninstall.py | |
parent | 7ebb2f54877edb28621c33e380f8777b1b1dc201 (diff) | |
download | portage-a3100be184ba1cac2f672f0a1cadcf01690c6d3f.tar.gz portage-a3100be184ba1cac2f672f0a1cadcf01690c6d3f.tar.bz2 portage-a3100be184ba1cac2f672f0a1cadcf01690c6d3f.zip |
AsynchronousTask: add _async_wait method
For cases where _start returns synchronously, this method is a
convenient way to trigger an asynchronous call to self.wait()
(in order to notify exit listeners), avoiding excessive event
loop recursion (or stack overflow) that synchronous calling of
exit listeners can cause.
Diffstat (limited to 'pym/_emerge/PackageUninstall.py')
-rw-r--r-- | pym/_emerge/PackageUninstall.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pym/_emerge/PackageUninstall.py b/pym/_emerge/PackageUninstall.py index eb6a947a5..16c2f749b 100644 --- a/pym/_emerge/PackageUninstall.py +++ b/pym/_emerge/PackageUninstall.py @@ -1,4 +1,4 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import logging @@ -33,7 +33,7 @@ class PackageUninstall(CompositeTask): # Apparently the package got uninstalled # already, so we can safely return early. self.returncode = os.EX_OK - self.wait() + self._async_wait() return self.settings.setcpv(self.pkg) @@ -67,7 +67,7 @@ class PackageUninstall(CompositeTask): if retval != os.EX_OK: self._builddir_lock.unlock() self.returncode = retval - self.wait() + self._async_wait() return self._writemsg_level(">>> Unmerging %s...\n" % (self.pkg.cpv,), |