Skip to contentSkip to conversation

ast: Store anonymous python function contents in the datstore

PATCH New Richard Purdie 1 participant 1 message Aug 22, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ast: Store anonymous python function contents in the datstore

This is useful if we need to disable part of one during a backtrace for debugging purposes.

---

bitbake/lib/bb/parse/ast.py +1 -0
index 5367628..4e93630 100644
@@ -134,6 +134,7 @@ class MethodNode(AstNode):
             anonfuncs = data.getVar('__BBANONFUNCS') or []
             anonfuncs.append(funcname)
             data.setVar('__BBANONFUNCS', anonfuncs)
+            data.setVar(funcname, text)
         else:
             data.setVarFlag(self.func_name, "func", 1)
             data.setVar(self.func_name, text)