If given --verbose, don't print the whole error log again

This commit is contained in:
Daniel Martí 2014-03-23 00:10:33 +01:00
parent b23b560c72
commit 29ab3cf64d

View file

@ -944,7 +944,9 @@ def main():
logfile = open(os.path.join(log_dir, app['id'] + '.log'), 'a+') logfile = open(os.path.join(log_dir, app['id'] + '.log'), 'a+')
logfile.write(str(be)) logfile.write(str(be))
logfile.close() logfile.close()
print("Could not build app %s due to BuildException: %s" % (app['id'], be)) reason = str(be).split('\n',1)[0] if options.verbose else str(be)
print("Could not build app %s due to BuildException: %s" % (
app['id'], reason))
if options.stop: if options.stop:
sys.exit(1) sys.exit(1)
failed_apps[app['id']] = be failed_apps[app['id']] = be