diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-12-30 21:37:34 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-12-31 17:05:16 +0000 |
commit | 2c5bc0379675c11a84056b2ac5ccaad766c3e766 (patch) | |
tree | 737e3273fb98bb6d4d804e8b29853f1794b8259e /bitbake | |
parent | 42487f069b0b6212a140ddbc92b9c586f6940dc2 (diff) | |
download | poky-2c5bc0379675c11a84056b2ac5ccaad766c3e766.tar.gz |
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>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/ui/knotty.py | 4 |
1 files changed, 1 insertions, 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): | |||
630 | termfilter = tf(main, helper, console_handlers, params.options.quiet) | 630 | termfilter = tf(main, helper, console_handlers, params.options.quiet) |
631 | atexit.register(termfilter.finish) | 631 | atexit.register(termfilter.finish) |
632 | 632 | ||
633 | while True: | 633 | while main.shutdown < 2: |
634 | try: | 634 | try: |
635 | if (lastprint + printinterval) <= time.time(): | 635 | if (lastprint + printinterval) <= time.time(): |
636 | termfilter.keepAlive(printinterval) | 636 | termfilter.keepAlive(printinterval) |
637 | printinterval += printintervaldelta | 637 | printinterval += printintervaldelta |
638 | event = eventHandler.waitEvent(0) | 638 | event = eventHandler.waitEvent(0) |
639 | if event is None: | 639 | if event is None: |
640 | if main.shutdown > 1: | ||
641 | break | ||
642 | if not parseprogress: | 640 | if not parseprogress: |
643 | termfilter.updateFooter() | 641 | termfilter.updateFooter() |
644 | event = eventHandler.waitEvent(0.25) | 642 | event = eventHandler.waitEvent(0.25) |