Skip to contentSkip to conversation

[2.0] server/process: Fix logging issues where only the first message was displayed

bitbake Steve Sakoman 1 participant 1 message Jun 26, 2022 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

From: Richard Purdie <[email protected]>

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.

(cherry picked from commit d3e64f64525187f1409531a0bd99df576e627f7f)
---
 lib/bb/server/process.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
lib/bb/server/process.py +5 -2
index 613956f3..f2c5c158 100644
@@ -757,8 +757,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)
 
Signature · 1 line
2.25.1