From 5fe590cd6e60cba7b7f52826629e57e8ac67e195 Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Mon, 24 Aug 2015 15:31:59 -0700 Subject: bitbake: 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. (Bitbake rev: c514b6fbea77ede1b7871b89592a33ed39b1d71c) Signed-off-by: Christopher Larson Signed-off-by: Richard Purdie --- bitbake/lib/bb/data_smart.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bitbake') diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index 75e22f9c45..79b4ed9329 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/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-54-g00ecf