diff options
author | Li Wang <li.wang@windriver.com> | 2013-06-25 14:31:14 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-06-27 10:06:09 +0100 |
commit | 10e44f162c8ac71965faaeb70b8bfdeb264ba76c (patch) | |
tree | c1128ab27caf605dc71fc7d14e89c294a2558eb4 /bitbake | |
parent | 4852c4f6a109e64a0b3e342db733eb588389afcc (diff) | |
download | poky-10e44f162c8ac71965faaeb70b8bfdeb264ba76c.tar.gz |
bitbake: bitbake: python funcname can not include special character @
[YOCTO #4772]
When path:file change to python function, it maybe include '@' character.
So, add the special character to change to '_' for avoid error.
(Bitbake rev: 684bc6dcb11ecb1fd7a4d25c08909ad9879e8342)
Signed-off-by: Li Wang <li.wang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/parse/ast.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py index 6e7fd84b16..d4b8b09543 100644 --- a/bitbake/lib/bb/parse/ast.py +++ b/bitbake/lib/bb/parse/ast.py | |||
@@ -147,7 +147,7 @@ class MethodNode(AstNode): | |||
147 | def eval(self, data): | 147 | def eval(self, data): |
148 | text = '\n'.join(self.body) | 148 | text = '\n'.join(self.body) |
149 | if self.func_name == "__anonymous": | 149 | if self.func_name == "__anonymous": |
150 | funcname = ("__anon_%s_%s" % (self.lineno, self.filename.translate(string.maketrans('/.+-', '____')))) | 150 | funcname = ("__anon_%s_%s" % (self.lineno, self.filename.translate(string.maketrans('/.+-@', '_____')))) |
151 | text = "def %s(d):\n" % (funcname) + text | 151 | text = "def %s(d):\n" % (funcname) + text |
152 | bb.methodpool.insert_method(funcname, text, self.filename) | 152 | bb.methodpool.insert_method(funcname, text, self.filename) |
153 | anonfuncs = data.getVar('__BBANONFUNCS') or [] | 153 | anonfuncs = data.getVar('__BBANONFUNCS') or [] |