summaryrefslogtreecommitdiffstats
path: root/lib/bb/cooker.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-13 17:34:42 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-13 17:45:37 +0100
commitdacc94bcace85a2e95aee2dccd8e680c59e4545f (patch)
tree0433ee134621cf83f413257b4ddca1a58cda0b10 /lib/bb/cooker.py
parent568ea00acd226d48e725bb01d4f8c410ed1eaa61 (diff)
downloadbitbake-dacc94bcace85a2e95aee2dccd8e680c59e4545f.tar.gz
cooker: updateCache should rause exceptions, not sys.exit
Exiting from the server is antisocial, instead we should raise an exception. This will correctly fail the current command and reset the server state. We use the handled exception since for these conditions to occur, something was already displayed to the user. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/cooker.py')
-rw-r--r--lib/bb/cooker.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 0a4dc7eb6..a07615b04 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -1172,7 +1172,7 @@ class BBCooker:
if self.state in (state.shutdown, state.forceshutdown):
self.parser.shutdown(clean=False, force = True)
- sys.exit(1)
+ raise bb.BBHandledException()
if self.state != state.parsing:
self.parseConfiguration ()
@@ -1194,7 +1194,7 @@ class BBCooker:
if not self.parser.parse_next():
collectlog.debug(1, "parsing complete")
if self.parser.error:
- sys.exit(1)
+ raise bb.BBHandledException()
self.show_appends_with_no_recipes()
self.handlePrefProviders()
self.recipecache.bbfile_priority = self.collection.collection_priorities(self.recipecache.pkg_fn)