bitbake: 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.

(Bitbake rev: 9a4db1aa608c17d31bf5ea1cab5a99beb565dd83)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2016-05-12 08:15:34 +01:00
parent 2fc5d5da6f
commit c0db739f35
1 changed files with 1 additions and 2 deletions

View File

@ -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