projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
56d2d75
)
PopenProcess: child_watch_add if no pipe_reader
author
Zac Medico
<zmedico@gentoo.org>
Thu, 18 Oct 2012 01:23:11 +0000
(18:23 -0700)
committer
Zac Medico
<zmedico@gentoo.org>
Thu, 18 Oct 2012 01:23:11 +0000
(18:23 -0700)
pym/portage/util/_async/PopenProcess.py
patch
|
blob
|
history
diff --git
a/pym/portage/util/_async/PopenProcess.py
b/pym/portage/util/_async/PopenProcess.py
index 37d32f26016281517d9565cfb135ec280fde7f9f..2fc56d2955b79bd42aaef1d6a34c8fc85d84bf2f 100644
(file)
--- a/
pym/portage/util/_async/PopenProcess.py
+++ b/
pym/portage/util/_async/PopenProcess.py
@@
-7,13
+7,15
@@
class PopenProcess(SubProcess):
__slots__ = ("pipe_reader", "proc",)
- def _
_init__(self, **kwargs
):
- SubProcess.__init__(self, **kwargs)
+ def _
start(self
):
+
self.pid = self.proc.pid
self._registered = True
- def _start(self):
- if self.pipe_reader is not None:
+ if self.pipe_reader is None:
+ self._reg_id = self.scheduler.child_watch_add(
+ self.pid, self._child_watch_cb)
+ else:
try:
self.pipe_reader.scheduler = self.scheduler
except AttributeError: