[oe-commits] [bitbake] 17/18: main: Ensure exceptions are correctly displayed

git at git.openembedded.org git at git.openembedded.org
Thu May 12 08:41:30 UTC 2016


rpurdie pushed a commit to branch master-next
in repository bitbake.

commit 4745e5b9f1378ebec82f359a345d140e86073744
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Thu May 12 08:15:34 2016 +0100

    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 <richard.purdie at linuxfoundation.org>
---
 lib/bb/main.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/bb/main.py b/lib/bb/main.py
index a287905..b296ef8 100755
--- a/lib/bb/main.py
+++ b/lib/bb/main.py
@@ -336,7 +336,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"):
             import queue
             try:
@@ -345,7 +344,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

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list