From 926b60f6e4b95ea6c9f108034e0ad03bc7f9ff14 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 13 Sep 2013 17:34:06 +0100 Subject: bitbake: 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. (Bitbake rev: 568ea00acd226d48e725bb01d4f8c410ed1eaa61) Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/knotty.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bitbake/lib/bb') diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py index f706b9759d..35590a2a79 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: -- cgit v1.2.3-54-g00ecf