From 261da52339fba3be8f811f2745af0bee8963c2fa Mon Sep 17 00:00:00 2001 From: Paul Barker Date: Tue, 20 Jul 2021 18:16:28 +0100 Subject: bitbake: parse/ast: Substitute '~' when naming anonymous functions When parsing an anonymous python function, bitbake generates a name for the function based on the full path to the file in which it was found. As not all characters which are valid in file paths are valid in Python function names we have a translation table. However, this translation table was missing an entry for '~'. (Bitbake rev: b201c0b284e25c20685d9d206797c4cc650eeca0) Signed-off-by: Paul Barker Signed-off-by: Richard Purdie --- bitbake/lib/bb/parse/ast.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bitbake/lib/bb/parse/ast.py') diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py index db2bdc35ec..977ba375bf 100644 --- a/bitbake/lib/bb/parse/ast.py +++ b/bitbake/lib/bb/parse/ast.py @@ -146,7 +146,7 @@ class DataNode(AstNode): data.setVar(key, val, parsing=True, **loginfo) class MethodNode(AstNode): - tr_tbl = str.maketrans('/.+-@%&', '_______') + tr_tbl = str.maketrans('/.+-@%&~', '________') def __init__(self, filename, lineno, func_name, body, python, fakeroot): AstNode.__init__(self, filename, lineno) -- cgit v1.2.3-54-g00ecf