diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-12-14 12:33:01 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-12-14 12:36:04 +0000 |
commit | 853d707af541981190a476bd078837c0e19b53b3 (patch) | |
tree | 78dafd2218034b0d8614473afd819a34638ef8a9 /bitbake | |
parent | 5d968368bc8b5813b0579910e23bd50fa6bd874b (diff) | |
download | ast2050-yocto-poky-853d707af541981190a476bd078837c0e19b53b3.zip ast2050-yocto-poky-853d707af541981190a476bd078837c0e19b53b3.tar.gz |
bitbake: data_smart/BBHandler: Fix SkipParse exception handling
If SkipParse is raised from something which isn't anonymous python, it wasn't
being handled correctly. This improves the handling for example from within inline
python.
(Bitbake rev: 7467d7d66b24cc8f43ab168e65895e7c4aee6092)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/data_smart.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/parse/parse_py/BBHandler.py | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index fb8d9d5..d328400 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py @@ -143,6 +143,8 @@ class DataSmart(MutableMapping): break except ExpansionError: raise + except bb.parse.SkipPackage: + raise except Exception as exc: raise ExpansionError(varname, s, exc) diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py index e6039e1..2ee8ebd 100644 --- a/bitbake/lib/bb/parse/parse_py/BBHandler.py +++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py @@ -153,7 +153,12 @@ def handle(fn, d, include): if ext != ".bbclass": data.setVar('FILE', abs_fn, d) - statements.eval(d) + try: + statements.eval(d) + except bb.parse.SkipPackage: + bb.data.setVar("__SKIPPED", True, d) + if include == 0: + return { "" : d } if ext != ".bbclass" and include == 0: return ast.multi_finalize(fn, d) |