From cd01cd70242e7fc9c2d52375948bbe76378f1471 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 16 Mar 2011 18:42:59 -0700 Subject: [PATCH] CompositeTask: fix assertion in _wait --- pym/_emerge/CompositeTask.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pym/_emerge/CompositeTask.py b/pym/_emerge/CompositeTask.py index 4667b7813..b5e8ce5bb 100644 --- a/pym/_emerge/CompositeTask.py +++ b/pym/_emerge/CompositeTask.py @@ -49,6 +49,11 @@ class CompositeTask(AsynchronousTask): # don't wait for the same task more than once break if task is prev: + if self.returncode is not None: + # This is expected if we're being + # called from the task's exit listener + # after it's been cancelled. + break # Before the task.wait() method returned, an exit # listener should have set self._current_task to either # a different task or None. Something is wrong. -- 2.26.2