[bitbake-devel,2/2] utils: avoid printing traceback on ExpansionError during parsing

Submitted by Paul Eggleton on May 29, 2014, 5:17 p.m.


Message ID 85658d5f5073fcdda8f8109253efb01e5b8abef7.1401383609.git.paul.eggleton@linux.intel.com
State Accepted, archived
Headers show

Commit Message

Paul Eggleton May 29, 2014, 5:17 p.m.
If an ExpansionError occurs during better_exec() we should just raise it
instead of printing the traceback, so that recipe errors (such as broken
URLs in SRC_URI) are more easily comprehensible.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
 lib/bb/utils.py | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/lib/bb/utils.py b/lib/bb/utils.py
index 1be1874..ead5f36 100644
--- a/lib/bb/utils.py
+++ b/lib/bb/utils.py
@@ -357,6 +357,8 @@  def better_exec(code, context, text = None, realfile = "<code>"):
     except bb.BBHandledException:
         # Error already shown so passthrough
+    except bb.data_smart.ExpansionError:
+        raise
     except Exception as e:
         (t, value, tb) = sys.exc_info()