* [PATCH] knotty: Cleanup error/interruption handling
@ 2013-09-13 16:34 Richard Purdie
0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2013-09-13 16:34 UTC (permalink / raw)
To: bitbake-devel
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>
---
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index f706b97..35590a2 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/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:
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-09-13 16:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-13 16:34 [PATCH] knotty: Cleanup error/interruption handling Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox