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 <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Christopher Larson 2015-08-24 15:31:59 -07:00 committed by Richard Purdie
parent 7ef2f951d6
commit 5fe590cd6e
1 changed files with 2 additions and 1 deletions

View File

@ -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