summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-03-20 17:16:20 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-22 11:35:21 +0000
commit995b02b00cc04bda9b7430b16577bfddb89807b1 (patch)
tree59028f3132d293a233eeac2cc460830a8be26252 /scripts
parent258f98a27c897b08c0b706cc3d85469bff99b2d0 (diff)
downloadpoky-995b02b00cc04bda9b7430b16577bfddb89807b1.tar.gz
devtool: tidy up handling of parse failures
Since the tinfoil2 refactoring, if an error occurred during parsing, we were showing a traceback and not correctly exiting (since we weren't calling shutdown()). Fix both of these issues. (From OE-Core rev: 18304036e1b513fd12c049dbf549ba75c503ed84) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/devtool/__init__.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py
index 91111e1109..8c385beb89 100644
--- a/scripts/lib/devtool/__init__.py
+++ b/scripts/lib/devtool/__init__.py
@@ -114,8 +114,15 @@ def setup_tinfoil(config_only=False, basepath=None, tracking=False):
114 114
115 import bb.tinfoil 115 import bb.tinfoil
116 tinfoil = bb.tinfoil.Tinfoil(tracking=tracking) 116 tinfoil = bb.tinfoil.Tinfoil(tracking=tracking)
117 tinfoil.prepare(config_only) 117 try:
118 tinfoil.logger.setLevel(logger.getEffectiveLevel()) 118 tinfoil.prepare(config_only)
119 tinfoil.logger.setLevel(logger.getEffectiveLevel())
120 except bb.tinfoil.TinfoilUIException:
121 tinfoil.shutdown()
122 raise DevtoolError('Failed to start bitbake environment')
123 except:
124 tinfoil.shutdown()
125 raise
119 finally: 126 finally:
120 os.chdir(orig_cwd) 127 os.chdir(orig_cwd)
121 return tinfoil 128 return tinfoil