diff options
| author | Chris Larson <chris_larson@mentor.com> | 2011-01-04 13:06:49 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-01-06 10:49:01 +0000 |
| commit | 1204ed79fce14115b802012772be8cf8aedff781 (patch) | |
| tree | 78acc5ef19ad70eb7048acbad4033d7e8d554772 /bitbake/lib/bb/parse/ast.py | |
| parent | 74653168c08f4a3cee86e37e8f805ca3d4365e1a (diff) | |
| download | poky-1204ed79fce14115b802012772be8cf8aedff781.tar.gz | |
parse.ast: avoid code duplication for inherit
(Bitbake rev: 0b11a3d4eab84b372fd45b9537cf0327008daf8d)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/parse/ast.py')
| -rw-r--r-- | bitbake/lib/bb/parse/ast.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py index 55ab485990..fe2674d432 100644 --- a/bitbake/lib/bb/parse/ast.py +++ b/bitbake/lib/bb/parse/ast.py | |||
| @@ -260,11 +260,11 @@ class BBHandlerNode(AstNode): | |||
| 260 | bb.data.setVar('__BBHANDLERS', bbhands, data) | 260 | bb.data.setVar('__BBHANDLERS', bbhands, data) |
| 261 | 261 | ||
| 262 | class InheritNode(AstNode): | 262 | class InheritNode(AstNode): |
| 263 | def __init__(self, files): | 263 | def __init__(self, classes): |
| 264 | self.n = __word__.findall(files) | 264 | self.classes = classes |
| 265 | 265 | ||
| 266 | def eval(self, data): | 266 | def eval(self, data): |
| 267 | bb.parse.BBHandler.inherit(self.n, data) | 267 | bb.parse.BBHandler.inherit(self.classes, data) |
| 268 | 268 | ||
| 269 | def handleInclude(statements, m, fn, lineno, force): | 269 | def handleInclude(statements, m, fn, lineno, force): |
| 270 | statements.append(IncludeNode(m.group(1), fn, lineno, force)) | 270 | statements.append(IncludeNode(m.group(1), fn, lineno, force)) |
| @@ -300,9 +300,8 @@ def handleBBHandlers(statements, m): | |||
| 300 | statements.append(BBHandlerNode(m.group(1))) | 300 | statements.append(BBHandlerNode(m.group(1))) |
| 301 | 301 | ||
| 302 | def handleInherit(statements, m): | 302 | def handleInherit(statements, m): |
| 303 | files = m.group(1) | 303 | classes = m.group(1) |
| 304 | n = __word__.findall(files) | 304 | statements.append(InheritNode(__word__.findall(classes))) |
| 305 | statements.append(InheritNode(m.group(1))) | ||
| 306 | 305 | ||
| 307 | def finalize(fn, d, variant = None): | 306 | def finalize(fn, d, variant = None): |
| 308 | for lazykey in bb.data.getVar("__lazy_assigned", d) or (): | 307 | for lazykey in bb.data.getVar("__lazy_assigned", d) or (): |
