Do not wait, just .read()
.read() without arguments should read until EOF is received.
This commit is contained in:
parent
0a87b558d9
commit
7d98218b64
|
@ -12,8 +12,6 @@ from io import BytesIO
|
||||||
|
|
||||||
import pexpect
|
import pexpect
|
||||||
|
|
||||||
from powerline.lib.monotonic import monotonic
|
|
||||||
|
|
||||||
|
|
||||||
def get_argparser(ArgumentParser=argparse.ArgumentParser):
|
def get_argparser(ArgumentParser=argparse.ArgumentParser):
|
||||||
parser = ArgumentParser(description='Run powerline shell test using pexpect')
|
parser = ArgumentParser(description='Run powerline shell test using pexpect')
|
||||||
|
@ -98,14 +96,6 @@ def main():
|
||||||
sleep(1)
|
sleep(1)
|
||||||
# TODO Implement something more smart
|
# TODO Implement something more smart
|
||||||
|
|
||||||
start = monotonic()
|
|
||||||
while child.isalive():
|
|
||||||
sleep(0.1)
|
|
||||||
if monotonic() - start > 60 * 3:
|
|
||||||
# Waiting for three minutes. This is long enough.
|
|
||||||
child.kill()
|
|
||||||
break
|
|
||||||
|
|
||||||
with open(full_log_file_name, 'wb') as LF:
|
with open(full_log_file_name, 'wb') as LF:
|
||||||
LF.write(child.read())
|
LF.write(child.read())
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue