diff --git a/keymatic.py b/keymatic.py index 654b4a4..9db61d6 100755 --- a/keymatic.py +++ b/keymatic.py @@ -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