summaryrefslogtreecommitdiffstats
path: root/lib/bb/parse/ast.py
diff options
context:
space:
mode:
authorLi Wang <li.wang@windriver.com>2013-06-25 14:31:14 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-27 10:00:23 +0100
commit684bc6dcb11ecb1fd7a4d25c08909ad9879e8342 (patch)
treeaa35acb365bb6fb4455bb8913fb9d1335340dfe9 /lib/bb/parse/ast.py
parent2beb9589b1bd9773f587b4dc08afdfe50f4ea913 (diff)
downloadbitbake-684bc6dcb11ecb1fd7a4d25c08909ad9879e8342.tar.gz
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. Signed-off-by: Li Wang <li.wang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/parse/ast.py')
-rw-r--r--lib/bb/parse/ast.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/parse/ast.py b/lib/bb/parse/ast.py
index 6e7fd84b1..d4b8b0954 100644
--- a/lib/bb/parse/ast.py
+++ b/lib/bb/parse/ast.py
@@ -147,7 +147,7 @@ class MethodNode(AstNode):
def eval(self, data):
text = '\n'.join(self.body)
if self.func_name == "__anonymous":
- funcname = ("__anon_%s_%s" % (self.lineno, self.filename.translate(string.maketrans('/.+-', '____'))))
+ funcname = ("__anon_%s_%s" % (self.lineno, self.filename.translate(string.maketrans('/.+-@', '_____'))))
text = "def %s(d):\n" % (funcname) + text
bb.methodpool.insert_method(funcname, text, self.filename)
anonfuncs = data.getVar('__BBANONFUNCS') or []