summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-13 17:34:06 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-13 17:45:37 +0100
commit568ea00acd226d48e725bb01d4f8c410ed1eaa61 (patch)
treefc2e81729636875b213733ce4ef310a00b898e16
parent70a8ead31f9ffc987d9c6db61a926f7a9af8f8b1 (diff)
downloadbitbake-568ea00acd226d48e725bb01d4f8c410ed1eaa61.tar.gz
knotty: Cleanup error/interruption handling
Only display a CommandFailed ERROR: message if there is an error to display. Only display an errors summary if we actually displayed errors. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/ui/knotty.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py
index f706b9759..35590a2a7 100644
--- a/lib/bb/ui/knotty.py
+++ b/lib/bb/ui/knotty.py
@@ -405,8 +405,9 @@ def main(server, eventHandler, params, tf = TerminalFilter):
if isinstance(event, bb.command.CommandFailed):
return_value = event.exitcode
- errors = errors + 1
- logger.error("Command execution failed: %s", event.error)
+ if event.error:
+ errors = errors + 1
+ logger.error("Command execution failed: %s", event.error)
main.shutdown = 2
continue
if isinstance(event, bb.command.CommandExit):
@@ -520,7 +521,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
if warnings:
summary += pluralise("\nSummary: There was %s WARNING message shown.",
"\nSummary: There were %s WARNING messages shown.", warnings)
- if return_value:
+ if return_value and errors:
summary += pluralise("\nSummary: There was %s ERROR message shown, returning a non-zero exit code.",
"\nSummary: There were %s ERROR messages shown, returning a non-zero exit code.", errors)
if summary: