aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/build.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-30 15:56:11 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-06-01 14:29:32 +0100
commit8a43a6a32bafc654046250f5362509fd92dd4d10 (patch)
treec074c7cb1bec33de902e32d11abec2c2e252471d /bitbake/lib/bb/build.py
parent4a78f52d87d5bba57e24f550a84d99e045777b30 (diff)
downloadopenembedded-core-contrib-8a43a6a32bafc654046250f5362509fd92dd4d10.tar.gz
bitbake: build/utils: Fix broken exception handling
Checking for explicit exception names is bad, we also want to be able top rely on inheritance. Fix these checks to be part of the real except clauses so SkipPackage is recognised as being inherited from SkipRecipe. (Bitbake rev: b131229145e1f2c372d6230a7b554e436c13c3f9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/build.py')
-rw-r--r--bitbake/lib/bb/build.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 98ee36ce58..32022d8085 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -242,10 +242,9 @@ def exec_func_python(func, d, runfile, cwd=None):
try:
comp = utils.better_compile(code, func, bbfile)
utils.better_exec(comp, {"d": d}, code, bbfile)
+ except (bb.parse.SkipRecipe, bb.build.FuncFailed):
+ raise
except:
- if sys.exc_info()[0] in (bb.parse.SkipRecipe, bb.build.FuncFailed):
- raise
-
raise FuncFailed(func, None)
finally:
bb.debug(2, "Python function %s finished" % func)