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

Submitted by Richard Purdie on March 28, 2014, 5:07 p.m. | Patch ID: 69597


Message ID 1396026441.14790.8.camel@ted
State New
Headers show

Commit Message

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 hide | download patch | download mbox

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):
     except Exception as e:
         exc_info = sys.exc_info()
-        while True:
+        while hasattr(server, "event_queue"):
                 import queue
             except ImportError: