Improve grammar in build log error message. (#5214)
- "1 error found" instead of "1 errors found" - don't print any build log context if no errors were found; just refer the user to the build log.
This commit is contained in:
parent
a0f39397c1
commit
313771c734
@ -739,8 +739,13 @@ def long_message(self):
|
||||
# the build log with errors highlighted.
|
||||
if self.build_log:
|
||||
events = parse_log_events(self.build_log)
|
||||
out.write("\n%d errors in build log:\n" % len(events))
|
||||
out.write(make_log_context(events))
|
||||
nerr = len(events)
|
||||
if nerr > 0:
|
||||
if nerr == 1:
|
||||
out.write("\n1 error found in build log:\n")
|
||||
else:
|
||||
out.write("\n%d errors found in build log:\n" % nerr)
|
||||
out.write(make_log_context(events))
|
||||
|
||||
else:
|
||||
# The error happened in in the Python code, so try to show
|
||||
|
Loading…
Reference in New Issue
Block a user