summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-03-19 19:01:47 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-24 22:54:36 +0000
commit0412631fb4a15ff42bf5ee46a77920fa558ae358 (patch)
treec6e0e56afb736b8c798e4e6878307602eb2ee89b
parentd377f7f88d73f4e5d2dffef03d6acee809827ac6 (diff)
downloadbitbake-0412631fb4a15ff42bf5ee46a77920fa558ae358.tar.gz
uievent: catch and log exceptions in receiving events
This patch prevents tracebacks and instead logs exceptions that may happen during event processing. [YOCTO #7216] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
-rw-r--r--lib/bb/ui/uievent.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/bb/ui/uievent.py b/lib/bb/ui/uievent.py
index c6b100c84..7fc50c759 100644
--- a/lib/bb/ui/uievent.py
+++ b/lib/bb/ui/uievent.py
@@ -106,7 +106,12 @@ class BBUIEventQueue:
self.server.timeout = 1
while not self.server.quit:
- self.server.handle_request()
+ try:
+ self.server.handle_request()
+ except Exception as e:
+ import traceback
+ logger.error("BBUIEventQueue.startCallbackHandler: Exception while trying to handle request: %s\n%s" % (e, traceback.format_exc(e)))
+
self.server.server_close()
def system_quit( self ):