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 <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2022-12-30 21:37:34 +00:00
parent 42487f069b
commit 2c5bc03796

View File

@@ -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)