summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/parse
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-22 13:54:01 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-23 09:22:44 +0100
commit9e8ba3036d8dde69f3a67925e6c1028469220f1e (patch)
treeb4695d652c41bc6ba2dd033aade902cbfe140199 /bitbake/lib/bb/parse
parentc8cce4e0d6c25e4ee85cf23790363905a188eef4 (diff)
downloadpoky-9e8ba3036d8dde69f3a67925e6c1028469220f1e.tar.gz
bitbake: ast: Rename PythonMethodNode define variable to modulename
It was hard for me to understand what the define variable was, modulename is hopefully a bit better. (Bitbake rev: 79f9f46319de85f85613ebe248c327f5852225ba) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/parse')
-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))