FIX: expect loops when reading from dead process
This commit is contained in:
parent
eceed89113
commit
605c97a1e3
1 changed files with 2 additions and 0 deletions
|
@ -28,6 +28,8 @@ def getBuffer(p):
|
|||
def expect(p, s, t=0):
|
||||
b = ""
|
||||
while True:
|
||||
if p.poll() is not None:
|
||||
raise Exception("Can't read data: Process Terminated")
|
||||
b = b + getBuffer(p).decode()
|
||||
if s in b:
|
||||
return b
|
||||
|
|
Loading…
Reference in a new issue