* wrap/python/spot.py: Check exit status also when timeout is used.

This commit is contained in:
Alexandre Duret-Lutz 2015-10-22 12:11:59 +02:00
parent 82ce722d42
commit b6c8a18dbc

View file

@ -380,6 +380,11 @@ def automata(*sources, timeout=None):
# would just kill the shell, not its children.
os.killpg(proc.pid, signal.SIGKILL)
raise
else:
ret = proc.wait()
if ret:
raise subprocess.CalledProcessError(ret,
filename[:-1])
finally:
proc = None
p = automaton_stream_parser(out, filename, True)