]> code.ossystems Code Review - openembedded-core.git/commitdiff
sanity.bbclass: Use pythonexception to raise real exceptions without backtraces
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 30 Mar 2016 19:55:42 +0000 (20:55 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 30 Mar 2016 20:23:54 +0000 (21:23 +0100)
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]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/sanity.bbclass

index a400bcadd03c38bbe7ca3a19e7ed4f4351874bcb..662f7645336131ccde191ac67a64f6480c91d92f 100644 (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