Skip to contentSkip to conversation

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

PATCH New Richard Purdie 1 participant 1 message Mar 30, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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]

meta/classes/sanity.bbclass +2 -2
index a400bca..662f764 100644
@@ -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
 
Signature · 1 line
cgit v0.10.2