Commit 86d08faf authored by Tristan Gingold's avatar Tristan Gingold

shell.py: check exit status for run().

parent 9308e8ba
......@@ -53,6 +53,9 @@ def run(command):
close_fds=not check_windows_tools(), # FIXME: comment
shell=True)
lines = command_out.stdout.readlines()
if command_out.wait() != 0:
logging.error("Shell command failed: %s", command)
quit(1)
if len(lines) == 0:
return None
return lines[0].strip().decode('utf-8')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment