]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
data: Drop misleading ExpansionError exception
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 4 Jan 2016 17:33:26 +0000 (17:33 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 5 Jan 2016 14:06:52 +0000 (14:06 +0000)
This codepath can be triggered by a python indentation error for example.
Showing it as an ExpansionError is misleading.

Change the code to add a warning about where the failure came from (in
particular giving the variable key name that triggered it) but raise the
proper exception.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/data.py

index dc8d02e01d97c333f0576a1823a8705985d705b8..fac57da71d857a36deb5d96129b1a6922f797aa7 100644 (file)
@@ -406,7 +406,8 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, d):
         deps |= set((vardeps or "").split())
         deps -= set(varflags.get("vardepsexclude", "").split())
     except Exception as e:
-        raise bb.data_smart.ExpansionError(key, None, e)
+        bb.warn("Exception during build_dependencies for %s" % key)
+        raise
     return deps, value
     #bb.note("Variable %s references %s and calls %s" % (key, str(deps), str(execs)))
     #d.setVarFlag(key, "vardeps", deps)