mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
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:
@@ -335,7 +335,6 @@ def start_server(servermodule, configParams, configuration, features):
|
|||||||
server.addcooker(cooker)
|
server.addcooker(cooker)
|
||||||
server.saveConnectionDetails()
|
server.saveConnectionDetails()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
exc_info = sys.exc_info()
|
|
||||||
while hasattr(server, "event_queue"):
|
while hasattr(server, "event_queue"):
|
||||||
try:
|
try:
|
||||||
import queue
|
import queue
|
||||||
@@ -347,7 +346,7 @@ def start_server(servermodule, configParams, configuration, features):
|
|||||||
break
|
break
|
||||||
if isinstance(event, logging.LogRecord):
|
if isinstance(event, logging.LogRecord):
|
||||||
logger.handle(event)
|
logger.handle(event)
|
||||||
raise exc_info[1], None, exc_info[2]
|
raise
|
||||||
server.detach()
|
server.detach()
|
||||||
cooker.lock.close()
|
cooker.lock.close()
|
||||||
return server
|
return server
|
||||||
|
|||||||
Reference in New Issue
Block a user