summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/parse/ast.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py
index 4d3a623aa2..b7eaff1c69 100644
--- a/bitbake/lib/bb/parse/ast.py
+++ b/bitbake/lib/bb/parse/ast.py
@@ -138,10 +138,10 @@ class MethodNode(AstNode):
138 data.setVar(self.func_name, '\n'.join(self.body)) 138 data.setVar(self.func_name, '\n'.join(self.body))
139 139
140class PythonMethodNode(AstNode): 140class PythonMethodNode(AstNode):
141 def __init__(self, filename, lineno, function, define, body): 141 def __init__(self, filename, lineno, function, modulename, body):
142 AstNode.__init__(self, filename, lineno) 142 AstNode.__init__(self, filename, lineno)
143 self.function = function 143 self.function = function
144 self.define = define 144 self.modulename = modulename
145 self.body = body 145 self.body = body
146 146
147 def eval(self, data): 147 def eval(self, data):
@@ -149,8 +149,8 @@ class PythonMethodNode(AstNode):
149 # 'this' file. This means we will not parse methods from 149 # 'this' file. This means we will not parse methods from
150 # bb classes twice 150 # bb classes twice
151 text = '\n'.join(self.body) 151 text = '\n'.join(self.body)
152 if not bb.methodpool.parsed_module(self.define): 152 if not bb.methodpool.parsed_module(self.modulename):
153 bb.methodpool.insert_method(self.define, text, self.filename) 153 bb.methodpool.insert_method(self.modulename, text, self.filename)
154 data.setVarFlag(self.function, "func", 1) 154 data.setVarFlag(self.function, "func", 1)
155 data.setVarFlag(self.function, "python", 1) 155 data.setVarFlag(self.function, "python", 1)
156 data.setVar(self.function, text) 156 data.setVar(self.function, text)
@@ -280,8 +280,8 @@ def handleData(statements, filename, lineno, groupd):
280def handleMethod(statements, filename, lineno, func_name, body): 280def handleMethod(statements, filename, lineno, func_name, body):
281 statements.append(MethodNode(filename, lineno, func_name, body)) 281 statements.append(MethodNode(filename, lineno, func_name, body))
282 282
283def handlePythonMethod(statements, filename, lineno, funcname, root, body): 283def handlePythonMethod(statements, filename, lineno, funcname, modulename, body):
284 statements.append(PythonMethodNode(filename, lineno, funcname, root, body)) 284 statements.append(PythonMethodNode(filename, lineno, funcname, modulename, body))
285 285
286def handleMethodFlags(statements, filename, lineno, key, m): 286def handleMethodFlags(statements, filename, lineno, key, m):
287 statements.append(MethodFlagsNode(filename, lineno, key, m)) 287 statements.append(MethodFlagsNode(filename, lineno, key, m))