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>
This commit is contained in:
parent
4852c4f6a1
commit
10e44f162c
|
@ -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 []
|
||||
|
|
Loading…
Reference in New Issue