Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/
Date: Sun, 29 Apr 2018 00:27:00
Message-Id: 1524961461.5ca431566538965927a33565c222c8994ad288d5.zmedico@gentoo
1 commit: 5ca431566538965927a33565c222c8994ad288d5
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sun Apr 29 00:24:21 2018 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sun Apr 29 00:24:21 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=5ca43156
7
8 SubProcess._poll(): fix deprecated wait() usage (bug 653856)
9
10 Use _async_wait() instead of wait().
11
12 Bug: https://bugs.gentoo.org/653856
13
14 pym/_emerge/SubProcess.py | 9 +++++++--
15 1 file changed, 7 insertions(+), 2 deletions(-)
16
17 diff --git a/pym/_emerge/SubProcess.py b/pym/_emerge/SubProcess.py
18 index f684c5a22..13cf9d361 100644
19 --- a/pym/_emerge/SubProcess.py
20 +++ b/pym/_emerge/SubProcess.py
21 @@ -40,7 +40,7 @@ class SubProcess(AbstractPollTask):
22 if retval[0] == 0:
23 return None
24 self._set_returncode(retval)
25 - self.wait()
26 + self._async_wait()
27 return self.returncode
28
29 def _cancel(self):
30 @@ -62,7 +62,9 @@ class SubProcess(AbstractPollTask):
31 self.returncode is None
32
33 def _wait(self):
34 -
35 + """
36 + Deprecated. Use _async_wait() instead.
37 + """
38 if self.returncode is not None:
39 return self.returncode
40
41 @@ -121,6 +123,9 @@ class SubProcess(AbstractPollTask):
42 self._async_wait()
43
44 def _waitpid_loop(self):
45 + """
46 + Deprecated. Use _async_waitpid() instead.
47 + """
48 source_id = self.scheduler.child_watch_add(
49 self.pid, self._waitpid_cb)
50 try: