aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbitbake/lib/bb/main.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/bitbake/lib/bb/main.py b/bitbake/lib/bb/main.py
index dd0439391e9..c0ae38ab6dd 100755
--- a/bitbake/lib/bb/main.py
+++ b/bitbake/lib/bb/main.py
@@ -403,10 +403,16 @@ def bitbake_main(configParams, configuration):
if not configParams.server_only:
try:
server_connection = server.establishConnection(featureset)
- server_connection.setupEventQueue()
except Exception as e:
bb.fatal("Could not connect to server %s: %s" % (configParams.remote_server, str(e)))
+ if configParams.kill_server:
+ server_connection.connection.terminateServer()
+ bb.event.ui_queue = []
+ return 0
+
+ server_connection.setupEventQueue()
+
# Restore the environment in case the UI needs it
for k in cleanedvars:
os.environ[k] = cleanedvars[k]
@@ -418,11 +424,6 @@ def bitbake_main(configParams, configuration):
server_connection.terminate()
return 0
- if configParams.kill_server:
- server_connection.connection.terminateServer()
- bb.event.ui_queue = []
- return 0
-
try:
return ui_module.main(server_connection.connection, server_connection.events, configParams)
finally: