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

login
register
mail settings
Submitter Paul Eggleton
Date May 29, 2014, 5:17 p.m.
Message ID <85658d5f5073fcdda8f8109253efb01e5b8abef7.1401383609.git.paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/72969/
State New
Headers show

Comments

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

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
         raise
+    except bb.data_smart.ExpansionError:
+        raise
     except Exception as e:
         (t, value, tb) = sys.exc_info()