commit:     b0ed587308eb3cbfafe9abcb1c59f24f48b97cdc
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 24 03:06:03 2020 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Aug 24 03:21:10 2020 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=b0ed5873

async_iter_completed: fix InvalidStateError in finally clause (bug 738766)

Do not attempt to wait for the TaskScheduler instance in the finally
clause, since it will always raise InvalidStateError if its status
is not available yet (which is normal if it has remaining tasks with
done callbacks that have not been scheduled yet).

Bug: https://bugs.gentoo.org/738766
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 lib/portage/util/futures/iter_completed.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/portage/util/futures/iter_completed.py 
b/lib/portage/util/futures/iter_completed.py
index 3c1a58e7e..43672171b 100644
--- a/lib/portage/util/futures/iter_completed.py
+++ b/lib/portage/util/futures/iter_completed.py
@@ -109,7 +109,6 @@ def async_iter_completed(futures, max_jobs=None, 
max_load=None, loop=None):
                # cleanup in case of interruption by SIGINT, etc
                if not loop.is_closed():
                        scheduler.cancel()
-                       scheduler.wait()
 
 
 def iter_gather(futures, max_jobs=None, max_load=None, loop=None):

Reply via email to