Bug 418009 - more followup, this time to deal with logspam due to self._process being a different class on different systems, with subtly different APIs. Python's library system's APIs for cross-platformness leave much to be desired, unfortunately...
git-svn-id: svn://10.0.0.236/trunk@249792 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -185,9 +185,15 @@ class Process:
|
||||
"Continues execution of this process on a separate thread."
|
||||
p = self._process
|
||||
out = self._out
|
||||
|
||||
if IS_WIN32:
|
||||
running = lambda: p.poll() is None
|
||||
else:
|
||||
running = lambda: p.poll() == -1
|
||||
|
||||
# read in lines until the process finishes, then read in any last remaining
|
||||
# buffered lines
|
||||
while p.poll() == -1:
|
||||
while running():
|
||||
line = out.readline().rstrip()
|
||||
if len(line) > 0:
|
||||
log.info(line)
|
||||
|
||||
Reference in New Issue
Block a user