Skip to contentSkip to conversation

data: Drop misleading ExpansionError exception

PATCH New Richard Purdie 1 participant 1 message Jan 4, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 data: Drop misleading ExpansionError exception

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.

bitbake/lib/bb/data.py +2 -1
index dc8d02e..fac57da 100644
@@ -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)