diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-12 08:15:34 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-13 13:41:33 +0100 |
| commit | c0db739f3525f935ecb5a32f3b2ff26df92ff252 (patch) | |
| tree | 2472d2eb549e50b55947542d4ec9bb6646a85f79 | |
| parent | 2fc5d5da6fc857dcb3a1ec03dd6224c2af9f41cb (diff) | |
| download | poky-c0db739f3525f935ecb5a32f3b2ff26df92ff252.tar.gz | |
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>
| -rwxr-xr-x | bitbake/lib/bb/main.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/bitbake/lib/bb/main.py b/bitbake/lib/bb/main.py index eb15779fac..761ea459cf 100755 --- a/bitbake/lib/bb/main.py +++ b/bitbake/lib/bb/main.py | |||
| @@ -335,7 +335,6 @@ def start_server(servermodule, configParams, configuration, features): | |||
| 335 | server.addcooker(cooker) | 335 | server.addcooker(cooker) |
| 336 | server.saveConnectionDetails() | 336 | server.saveConnectionDetails() |
| 337 | except Exception as e: | 337 | except Exception as e: |
| 338 | exc_info = sys.exc_info() | ||
| 339 | while hasattr(server, "event_queue"): | 338 | while hasattr(server, "event_queue"): |
| 340 | try: | 339 | try: |
| 341 | import queue | 340 | import queue |
| @@ -347,7 +346,7 @@ def start_server(servermodule, configParams, configuration, features): | |||
| 347 | break | 346 | break |
| 348 | if isinstance(event, logging.LogRecord): | 347 | if isinstance(event, logging.LogRecord): |
| 349 | logger.handle(event) | 348 | logger.handle(event) |
| 350 | raise exc_info[1], None, exc_info[2] | 349 | raise |
| 351 | server.detach() | 350 | server.detach() |
| 352 | cooker.lock.close() | 351 | cooker.lock.close() |
| 353 | return server | 352 | return server |
