diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-03 16:04:26 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-03 16:08:31 +0100 |
commit | e8ed1454aec700fa4553c68123cdaec36bb23e45 (patch) | |
tree | 8a5c2e5fcc3fab99fad583a0e169f9bced91a09d | |
parent | a6ce10e83ed637c0e39cd4fcf567042f75cd1157 (diff) | |
download | poky-e8ed1454aec700fa4553c68123cdaec36bb23e45.tar.gz |
bitbake/ast: Ensure function definitions are always added to the dictonary
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-rw-r--r-- | bitbake/lib/bb/parse/ast.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py index 3c341b0c70..b800569434 100644 --- a/bitbake/lib/bb/parse/ast.py +++ b/bitbake/lib/bb/parse/ast.py | |||
@@ -147,12 +147,12 @@ class PythonMethodNode(AstNode): | |||
147 | # Note we will add root to parsedmethods after having parse | 147 | # Note we will add root to parsedmethods after having parse |
148 | # 'this' file. This means we will not parse methods from | 148 | # 'this' file. This means we will not parse methods from |
149 | # bb classes twice | 149 | # bb classes twice |
150 | text = '\n'.join(self.body) | ||
150 | if not bb.methodpool.parsed_module(self.root): | 151 | if not bb.methodpool.parsed_module(self.root): |
151 | text = '\n'.join(self.body) | ||
152 | bb.methodpool.insert_method(self.root, text, self.fn) | 152 | bb.methodpool.insert_method(self.root, text, self.fn) |
153 | bb.data.setVarFlag(self.func_name, "func", 1, data) | 153 | bb.data.setVarFlag(self.func_name, "func", 1, data) |
154 | bb.data.setVarFlag(self.func_name, "python", 1, data) | 154 | bb.data.setVarFlag(self.func_name, "python", 1, data) |
155 | bb.data.setVar(self.func_name, text, data) | 155 | bb.data.setVar(self.func_name, text, data) |
156 | 156 | ||
157 | class MethodFlagsNode(AstNode): | 157 | class MethodFlagsNode(AstNode): |
158 | def __init__(self, key, m): | 158 | def __init__(self, key, m): |