aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Barker <paul@pbarker.dev>2021-07-20 18:16:28 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-07-29 23:18:04 +0100
commitb201c0b284e25c20685d9d206797c4cc650eeca0 (patch)
treeddff1712263c10eec1ced987a9e2281e7f99c77c
parentef2865efa98ad20823267364f2159d8d8c931400 (diff)
downloadbitbake-b201c0b284e25c20685d9d206797c4cc650eeca0.tar.gz
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 '~'. Signed-off-by: Paul Barker <paul@pbarker.dev> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 db2bdc35e..977ba375b 100644
--- a/lib/bb/parse/ast.py
+++ b/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)