From d3e64f64525187f1409531a0bd99df576e627f7f Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 24 Jun 2022 22:54:30 +0100 Subject: server/process: Fix logging issues where only the first message was displayed I realised only the first logging message was being displayed in a given parsing process. The reason turned out to be the UI handler failing with a "pop from empty list". The default handler was then lost and no further messages were processed. Fix this by catching the exception correctly in the connection writer code. Signed-off-by: Richard Purdie --- lib/bb/server/process.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py index 43790b663..5d02c0b9f 100644 --- a/lib/bb/server/process.py +++ b/lib/bb/server/process.py @@ -756,8 +756,11 @@ class ConnectionWriter(object): process.queue_signals = True self._send(obj) process.queue_signals = False - for sig in process.signal_received.pop(): - process.handle_sig(sig, None) + try: + for sig in process.signal_received.pop(): + process.handle_sig(sig, None) + except IndexError: + pass else: self._send(obj) -- cgit 1.2.3-korg