aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/command.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-10-06 13:42:39 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-10-14 16:58:55 +0100
commit42fa34142ea685f91115a551e74416ca28ef1c91 (patch)
tree1df2976acaf6febcd7a3406dc2a0420c759f6913 /lib/bb/command.py
parent03d051b6da52ec4ee26f97aa9038622f8d87e55d (diff)
downloadbitbake-42fa34142ea685f91115a551e74416ca28ef1c91.tar.gz
cooker/command: Add error state for the server and use for pre_serve errors
Currently if errors occur when starting the PR service, there is a race that occurs since the UI runs various commands including starting builds before processing the CookerExit(). By adding the error state and refusing to run async commands in this mode, builds are prevented from starting and the UI reaches the exit code with the system shutting down cleanly. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/command.py')
-rw-r--r--lib/bb/command.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bb/command.py b/lib/bb/command.py
index 3ca27a69e..a2795ce0b 100644
--- a/lib/bb/command.py
+++ b/lib/bb/command.py
@@ -86,6 +86,8 @@ class Command:
def runAsyncCommand(self):
try:
+ if self.cooker.state == bb.cooker.state.error:
+ return False
if self.currentAsyncCommand is not None:
(command, options) = self.currentAsyncCommand
commandmethod = getattr(CommandsAsync, command)