From 6ae662acdc145c541c3206717876beca1e563095 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 2 Feb 2016 13:54:37 +0000 Subject: bitbake: parse/ast: Mark anonymous functions as python functions Anonymous functions are python functions, set the variable flags as such so we can detect them and avoid expansion where needed. (Bitbake rev: 1b303785c578bbae3a89be8d751d80fba860f62e) Signed-off-by: Richard Purdie --- bitbake/lib/bb/parse/ast.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bitbake/lib/bb/parse/ast.py') diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py index 933a06e9bf..c676fc6bc8 100644 --- a/bitbake/lib/bb/parse/ast.py +++ b/bitbake/lib/bb/parse/ast.py @@ -156,8 +156,8 @@ class MethodNode(AstNode): anonfuncs = data.getVar('__BBANONFUNCS', False) or [] anonfuncs.append(funcname) data.setVar('__BBANONFUNCS', anonfuncs) - else: - data.setVarFlag(self.func_name, "func", 1) + data.setVarFlag(funcname, "python", 1) + data.setVarFlag(funcname, "func", 1) data.setVar(funcname, text, parsing=True) data.setVarFlag(funcname, 'filename', self.filename) data.setVarFlag(funcname, 'lineno', str(self.lineno - len(self.body))) -- cgit v1.2.3-54-g00ecf