Catch subprocess output and print
If bandersnatch fails, we don't get any useful logging info. Print the output on command failure. Change-Id: Ia38643afd3091fb06f080d0063536477f0ed73a4
This commit is contained in:
parent
e6451b8835
commit
d364bf6738
@ -56,8 +56,13 @@ def main():
|
||||
setup_logging(logger)
|
||||
|
||||
stale = dict()
|
||||
output = subprocess.check_output(
|
||||
['bandersnatch', 'mirror'], stderr=subprocess.STDOUT)
|
||||
try:
|
||||
output = subprocess.check_output(
|
||||
['bandersnatch', 'mirror'], stderr=subprocess.STDOUT)
|
||||
except subprocess.CalledProcessError as e:
|
||||
print e.output
|
||||
raise
|
||||
|
||||
for line in output.split('\n'):
|
||||
print(line)
|
||||
if 'Expected PyPI serial' in line:
|
||||
|
Loading…
x
Reference in New Issue
Block a user