commit:     9b93296e14e2e7f52cd2bf4d626eb7387f6786ab
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 26 08:09:08 2018 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Apr 26 08:39:19 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=9b93296e

CompositeTask._cancel(): use _async_wait() (bug 591760)

After setting the returncode due to the current task being
queued, use _async_wait() for consistency with the case
where the current task needs to be cancelled, so that either
case ultimately results in notification of exit listeners.

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

 pym/_emerge/CompositeTask.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pym/_emerge/CompositeTask.py b/pym/_emerge/CompositeTask.py
index bfd4bacbd..113e5935f 100644
--- a/pym/_emerge/CompositeTask.py
+++ b/pym/_emerge/CompositeTask.py
@@ -18,6 +18,7 @@ class CompositeTask(AsynchronousTask):
                        if self._current_task is self._TASK_QUEUED:
                                self.returncode = 1
                                self._current_task = None
+                               self._async_wait()
                        else:
                                self._current_task.cancel()
 

Reply via email to