From 2c5bc0379675c11a84056b2ac5ccaad766c3e766 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 30 Dec 2022 21:37:34 +0000 Subject: bitbake: knotty: Avoid looping with tracebacks If there are events queued and there is an exception in the main loop of the UI code, it will print tracebacks on the console indefinitely. Avoid that by improving the loop exit conditions. (Bitbake rev: 2d0940b920a22b244f3ba6849c7cd019578386b4) Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/knotty.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py index 61cf0a37f4..761c2dddaf 100644 --- a/bitbake/lib/bb/ui/knotty.py +++ b/bitbake/lib/bb/ui/knotty.py @@ -630,15 +630,13 @@ def main(server, eventHandler, params, tf = TerminalFilter): termfilter = tf(main, helper, console_handlers, params.options.quiet) atexit.register(termfilter.finish) - while True: + while main.shutdown < 2: try: if (lastprint + printinterval) <= time.time(): termfilter.keepAlive(printinterval) printinterval += printintervaldelta event = eventHandler.waitEvent(0) if event is None: - if main.shutdown > 1: - break if not parseprogress: termfilter.updateFooter() event = eventHandler.waitEvent(0.25) -- cgit v1.2.3-54-g00ecf