From: Richard Purdie Date: Thu, 12 May 2016 07:15:34 +0000 (+0100) Subject: main: Ensure exceptions are correctly displayed X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9a4db1aa608c17d31bf5ea1cab5a99beb565dd83;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git main: Ensure exceptions are correctly displayed If the cooker fails to start, ensure a correct exception is displayed to the user. After handling any queued events simply re-raise the original exception else the output can be unclear. Signed-off-by: Richard Purdie --- diff --git a/lib/bb/main.py b/lib/bb/main.py index eb15779facc..761ea459cf1 100755 --- a/lib/bb/main.py +++ b/lib/bb/main.py @@ -335,7 +335,6 @@ def start_server(servermodule, configParams, configuration, features): server.addcooker(cooker) server.saveConnectionDetails() except Exception as e: - exc_info = sys.exc_info() while hasattr(server, "event_queue"): try: import queue @@ -347,7 +346,7 @@ def start_server(servermodule, configParams, configuration, features): break if isinstance(event, logging.LogRecord): logger.handle(event) - raise exc_info[1], None, exc_info[2] + raise server.detach() cooker.lock.close() return server