From: Richard Purdie Date: Thu, 17 Oct 2013 10:48:09 +0000 (+0000) Subject: utils: Don't show stack traces for BBHandledException X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8a8bafc8ded98364a31878b23c64503a53affcd1;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git utils: Don't show stack traces for BBHandledException A BBHandledException means we already showed an error to the user so we shouldn't show a stack trace as this just confuses things further. Signed-off-by: Richard Purdie --- diff --git a/lib/bb/utils.py b/lib/bb/utils.py index f9ee4f1c1dc..560f55a0740 100644 --- a/lib/bb/utils.py +++ b/lib/bb/utils.py @@ -354,6 +354,9 @@ def better_exec(code, context, text = None, realfile = ""): code = better_compile(code, realfile, realfile) try: exec(code, get_context(), context) + except bb.BBHandledException: + # Error already shown so passthrough + raise except Exception as e: (t, value, tb) = sys.exc_info()