1 |
commit: 532366feaf8e3cb04e0d19d90498cfe0b9361ab1 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Apr 28 23:27:49 2018 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 28 23:27:49 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=532366fe |
7 |
|
8 |
PipeReaderBlockingIO: 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/portage/util/_async/PipeReaderBlockingIO.py | 9 ++++++--- |
15 |
1 file changed, 6 insertions(+), 3 deletions(-) |
16 |
|
17 |
diff --git a/pym/portage/util/_async/PipeReaderBlockingIO.py b/pym/portage/util/_async/PipeReaderBlockingIO.py |
18 |
index b06adf6ed..b426f7695 100644 |
19 |
--- a/pym/portage/util/_async/PipeReaderBlockingIO.py |
20 |
+++ b/pym/portage/util/_async/PipeReaderBlockingIO.py |
21 |
@@ -1,4 +1,4 @@ |
22 |
-# Copyright 2012 Gentoo Foundation |
23 |
+# Copyright 2012-2018 Gentoo Foundation |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
|
26 |
try: |
27 |
@@ -63,7 +63,7 @@ class PipeReaderBlockingIO(AbstractPollTask): |
28 |
self._registered = False |
29 |
if self.returncode is None: |
30 |
self.returncode = os.EX_OK |
31 |
- self.wait() |
32 |
+ self._async_wait() |
33 |
return False |
34 |
|
35 |
def _cancel(self): |
36 |
@@ -71,9 +71,12 @@ class PipeReaderBlockingIO(AbstractPollTask): |
37 |
self._registered = False |
38 |
if self.returncode is None: |
39 |
self.returncode = self._cancelled_returncode |
40 |
- self.wait() |
41 |
+ self._async_wait() |
42 |
|
43 |
def _wait(self): |
44 |
+ """ |
45 |
+ Deprecated. Use _async_wait() instead. |
46 |
+ """ |
47 |
if self.returncode is not None: |
48 |
return self.returncode |
49 |
self._wait_loop() |