All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sanity.bbclass: Use pythonexception to raise real exceptions without backtraces
@ 2016-03-30 19:55 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2016-03-30 19:55 UTC (permalink / raw)
  To: openembedded-core

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>

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index a400bca..662f764 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -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
 
-- 
cgit v0.10.2



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-03-30 19:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-30 19:55 [PATCH] sanity.bbclass: Use pythonexception to raise real exceptions without backtraces Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.