diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-09-13 17:34:42 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-09-14 08:20:38 +0100 |
commit | ca1b5ddb8621132634cad421d4eb86f4b82d47bd (patch) | |
tree | cccb4dafe1dc3bb500fedb0b152973fb79cc5107 /bitbake/lib/bb | |
parent | 926b60f6e4b95ea6c9f108034e0ad03bc7f9ff14 (diff) | |
download | poky-ca1b5ddb8621132634cad421d4eb86f4b82d47bd.tar.gz |
bitbake: 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.
(Bitbake rev: dacc94bcace85a2e95aee2dccd8e680c59e4545f)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 0a4dc7eb62..a07615b04c 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -1172,7 +1172,7 @@ class BBCooker: | |||
1172 | 1172 | ||
1173 | if self.state in (state.shutdown, state.forceshutdown): | 1173 | if self.state in (state.shutdown, state.forceshutdown): |
1174 | self.parser.shutdown(clean=False, force = True) | 1174 | self.parser.shutdown(clean=False, force = True) |
1175 | sys.exit(1) | 1175 | raise bb.BBHandledException() |
1176 | 1176 | ||
1177 | if self.state != state.parsing: | 1177 | if self.state != state.parsing: |
1178 | self.parseConfiguration () | 1178 | self.parseConfiguration () |
@@ -1194,7 +1194,7 @@ class BBCooker: | |||
1194 | if not self.parser.parse_next(): | 1194 | if not self.parser.parse_next(): |
1195 | collectlog.debug(1, "parsing complete") | 1195 | collectlog.debug(1, "parsing complete") |
1196 | if self.parser.error: | 1196 | if self.parser.error: |
1197 | sys.exit(1) | 1197 | raise bb.BBHandledException() |
1198 | self.show_appends_with_no_recipes() | 1198 | self.show_appends_with_no_recipes() |
1199 | self.handlePrefProviders() | 1199 | self.handlePrefProviders() |
1200 | self.recipecache.bbfile_priority = self.collection.collection_priorities(self.recipecache.pkg_fn) | 1200 | self.recipecache.bbfile_priority = self.collection.collection_priorities(self.recipecache.pkg_fn) |