summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/knotty.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/ui/knotty.py')
-rw-r--r--bitbake/lib/bb/ui/knotty.py43
1 files changed, 24 insertions, 19 deletions
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index 9e58b31727..84664551df 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -536,24 +536,29 @@ def main(server, eventHandler, params, tf = TerminalFilter):
536 if not params.observe_only: 536 if not params.observe_only:
537 _, error = server.runCommand(["stateForceShutdown"]) 537 _, error = server.runCommand(["stateForceShutdown"])
538 main.shutdown = 2 538 main.shutdown = 2
539 summary = "" 539 try:
540 if taskfailures: 540 summary = ""
541 summary += pluralise("\nSummary: %s task failed:", 541 if taskfailures:
542 "\nSummary: %s tasks failed:", len(taskfailures)) 542 summary += pluralise("\nSummary: %s task failed:",
543 for failure in taskfailures: 543 "\nSummary: %s tasks failed:", len(taskfailures))
544 summary += "\n %s" % failure 544 for failure in taskfailures:
545 if warnings: 545 summary += "\n %s" % failure
546 summary += pluralise("\nSummary: There was %s WARNING message shown.", 546 if warnings:
547 "\nSummary: There were %s WARNING messages shown.", warnings) 547 summary += pluralise("\nSummary: There was %s WARNING message shown.",
548 if return_value and errors: 548 "\nSummary: There were %s WARNING messages shown.", warnings)
549 summary += pluralise("\nSummary: There was %s ERROR message shown, returning a non-zero exit code.", 549 if return_value and errors:
550 "\nSummary: There were %s ERROR messages shown, returning a non-zero exit code.", errors) 550 summary += pluralise("\nSummary: There was %s ERROR message shown, returning a non-zero exit code.",
551 if summary: 551 "\nSummary: There were %s ERROR messages shown, returning a non-zero exit code.", errors)
552 print(summary) 552 if summary:
553 553 print(summary)
554 if interrupted: 554
555 print("Execution was interrupted, returning a non-zero exit code.") 555 if interrupted:
556 if return_value == 0: 556 print("Execution was interrupted, returning a non-zero exit code.")
557 return_value = 1 557 if return_value == 0:
558 return_value = 1
559 except IOError as e:
560 import errno
561 if e.errno == errno.EPIPE:
562 pass
558 563
559 return return_value 564 return return_value