Tools: build_binaries: raise a CalledProcessError on bad exit code
We've been silently ignoring bad exit codes. Stop that.
This commit is contained in:
parent
4d28fa8e09
commit
3f17ac765e
@ -68,14 +68,21 @@ class build_binaries(object):
|
||||
while True:
|
||||
x = p.stdout.readline()
|
||||
if len(x) == 0:
|
||||
if os.waitpid(p.pid, 0):
|
||||
returncode = os.waitpid(p.pid, 0)
|
||||
if returncode:
|
||||
break
|
||||
# select not available on Windows... probably...
|
||||
time.sleep(0.1)
|
||||
continue
|
||||
time.sleep(0.1)
|
||||
continue
|
||||
output += x
|
||||
x = x.rstrip()
|
||||
print("%s: %s" % (prefix, x))
|
||||
(_, status) = returncode
|
||||
if status != 0:
|
||||
self.progress("Process failed (%s)" %
|
||||
str(returncode))
|
||||
raise subprocess.CalledProcessError(
|
||||
returncode, cmd_list)
|
||||
return output
|
||||
|
||||
def run_make(self, args):
|
||||
|
Loading…
Reference in New Issue
Block a user