Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: lib/_emerge/
Date: Tue, 18 Feb 2020 06:45:32
Message-Id: 1582008283.036c644712c36b2d67e818e6f60aa753ebd6acaf.zmedico@gentoo
1 commit: 036c644712c36b2d67e818e6f60aa753ebd6acaf
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 18 06:40:57 2020 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 18 06:44:43 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=036c6447
7
8 AsynchronousTask: Call _start_hook after _start_async
9
10 The start listeners need to run after _start_async has
11 completed in case they rely on any state that _start_async
12 has created (same goes for _start).
13
14 Fixes: d66e9ec0b105 ("AsynchronousTask: add coroutine async_start method")
15 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
16
17 lib/_emerge/AsynchronousTask.py | 4 ++--
18 1 file changed, 2 insertions(+), 2 deletions(-)
19
20 diff --git a/lib/_emerge/AsynchronousTask.py b/lib/_emerge/AsynchronousTask.py
21 index 280ed16da..d1e23cdf1 100644
22 --- a/lib/_emerge/AsynchronousTask.py
23 +++ b/lib/_emerge/AsynchronousTask.py
24 @@ -25,8 +25,8 @@ class AsynchronousTask(SlotObject):
25
26 @coroutine
27 def async_start(self):
28 - self._start_hook()
29 yield self._async_start()
30 + self._start_hook()
31
32 @coroutine
33 def _async_start(self):
34 @@ -38,8 +38,8 @@ class AsynchronousTask(SlotObject):
35 """
36 Start an asynchronous task and then return as soon as possible.
37 """
38 - self._start_hook()
39 self._start()
40 + self._start_hook()
41
42 def _start(self):
43 self.returncode = os.EX_OK