aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-12-30 21:37:34 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-12-30 21:37:34 +0000
commit2d0940b920a22b244f3ba6849c7cd019578386b4 (patch)
tree3857d904ec9a0f561aec80824419a7adfa5ab31b
parentaeacfd391903fe68ae600470fc2bbad0502d401e (diff)
downloadbitbake-contrib-2d0940b920a22b244f3ba6849c7cd019578386b4.tar.gz
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/ui/knotty.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py
index 61cf0a37f..761c2ddda 100644
--- a/lib/bb/ui/knotty.py
+++ b/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)