Use “non-blocking” read and stop on TIMEOUT and EOF
This commit is contained in:
parent
deee40505d
commit
b7c7d29aa0
|
@ -98,7 +98,15 @@ def main():
|
||||||
# TODO Implement something more smart
|
# TODO Implement something more smart
|
||||||
|
|
||||||
with open(full_log_file_name, 'wb') as LF:
|
with open(full_log_file_name, 'wb') as LF:
|
||||||
LF.write(child.read())
|
while True:
|
||||||
|
try:
|
||||||
|
s = child.read_nonblocking(1000)
|
||||||
|
except pexpect.TIMEOUT:
|
||||||
|
break
|
||||||
|
except pexpect.EOF:
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
LF.write(s)
|
||||||
|
|
||||||
check_call([
|
check_call([
|
||||||
os.path.join('tests', 'shell', 'path', 'python'),
|
os.path.join('tests', 'shell', 'path', 'python'),
|
||||||
|
|
Loading…
Reference in New Issue