]> code.ossystems Code Review - openembedded-core.git/commitdiff
devtool: properly handle bb.build.FuncFailed when extracting source
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Tue, 26 Jan 2016 02:53:57 +0000 (15:53 +1300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 26 Jan 2016 18:04:35 +0000 (18:04 +0000)
When we run the tasks required to extract the source for a recipe (e.g.
within "devtool modify" or "devtool extract") if one of those tasks
fails you get a bb.build.FuncFailed exception; handle this properly so
you don't see a traceback.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/devtool/standard.py

index 187dff201fe01fa98d8b844e02aaaaa52f9071ab..18daf8499deea8d832abbe1f01d139532f2a92d5 100644 (file)
@@ -386,7 +386,10 @@ class BbTaskExecutor(object):
                 logger.info('Executing %s...' % func)
             fn = self.rdata.getVar('FILE', True)
             localdata = bb.build._task_data(fn, func, self.rdata)
-            bb.build.exec_func(func, localdata)
+            try:
+                bb.build.exec_func(func, localdata)
+            except bb.build.FuncFailed as e:
+                raise DevtoolError(str(e))
             self.executed.append(func)