From b6c8a18dbc0b81b42c01eaed2abfedc713851636 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Thu, 22 Oct 2015 12:11:59 +0200 Subject: [PATCH] * wrap/python/spot.py: Check exit status also when timeout is used. --- wrap/python/spot.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wrap/python/spot.py b/wrap/python/spot.py index 5ba841de0..a2d25cc22 100644 --- a/wrap/python/spot.py +++ b/wrap/python/spot.py @@ -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)