From c514b6fbea77ede1b7871b89592a33ed39b1d71c Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Mon, 24 Aug 2015 15:31:59 -0700 Subject: bb.data_smart: retain traceback from ExpansionError This gives us the needed context of the original ExpansionError, which is invaluable when we have a chain of function calls in the expansion. Signed-off-by: Christopher Larson Signed-off-by: Richard Purdie --- lib/bb/data_smart.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py index 75e22f9c..79b4ed93 100644 --- a/lib/bb/data_smart.py +++ b/lib/bb/data_smart.py @@ -392,7 +392,8 @@ class DataSmart(MutableMapping): except bb.parse.SkipRecipe: raise except Exception as exc: - raise ExpansionError(varname, s, exc) + exc_class, exc, tb = sys.exc_info() + raise ExpansionError, ExpansionError(varname, s, exc), tb varparse.value = s -- cgit v1.2.3