sanity.bbclass: Use pythonexception to raise real exceptions without backtraces

If the sanity code encounters a version change is doesn't understand, the current
output is unreadable and confusing for the user, particularly due to the presence
of the backtrace.

Use improved functionality in bitbake to improve this and correctly pass python
exceptions around.

[YOCTO #9291]

(From OE-Core rev: a0860e308645f17dbf4b9005b2fc0e9869d730bf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2016-03-30 20:55:42 +01:00
parent 6af88d873a
commit 2123a7ef28
1 changed files with 2 additions and 2 deletions

View File

@ -563,10 +563,10 @@ def sanity_check_conffiles(status, d):
d.getVar(current_version, True) != d.getVar(required_version, True):
success = True
try:
bb.build.exec_func(func, d)
bb.build.exec_func(func, d, pythonexception=True)
except NotImplementedError as e:
success = False
status.addresult(e.msg)
status.addresult(str(e))
if success:
status.reparse = True