Patchwork [bitbake-devel] bin/bitbake: Only try and process an event_queue if it exists

login
register
mail settings
Submitter Richard Purdie
Date March 28, 2014, 5:07 p.m.
Message ID <1396026441.14790.8.camel@ted>
Download mbox | patch
Permalink /patch/69597/
State New
Headers show

Comments

Richard Purdie - March 28, 2014, 5:07 p.m.
The connection may have failed before the event queue has been setup.
Handle this correctly in the exception handler.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---

Patch

diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
index cd01992..45f56b3 100755
--- a/bitbake/bin/bitbake
+++ b/bitbake/bin/bitbake
@@ -222,7 +222,7 @@  def start_server(servermodule, configParams, configuration, features):
         server.saveConnectionDetails()
     except Exception as e:
         exc_info = sys.exc_info()
-        while True:
+        while hasattr(server, "event_queue"):
             try:
                 import queue
             except ImportError: