diff options
author | Chris Laplante <chris.laplante@agilent.com> | 2023-10-16 14:33:46 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-10-16 22:29:05 +0100 |
commit | 5419a8473d6d4cd1d01537de68ad8d72cf5be0b2 (patch) | |
tree | 1af5829addac6e3b912b2c7a923b42471753942a | |
parent | 87f5987e22b3d1c05b29a25ef354ecd63ac9e1df (diff) | |
download | bitbake-5419a8473d6d4cd1d01537de68ad8d72cf5be0b2.tar.gz |
codeparser: replace deprecated ast.Str and 's'yocto-4.32023-10-nanbield2.6.0
These have been deprecated since 3.8
Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/codeparser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bb/codeparser.py b/lib/bb/codeparser.py index eabeda591..cb068844b 100644 --- a/lib/bb/codeparser.py +++ b/lib/bb/codeparser.py @@ -255,8 +255,8 @@ class PythonParser(): def visit_Call(self, node): name = self.called_node_name(node.func) if name and (name.endswith(self.getvars) or name.endswith(self.getvarflags) or name in self.containsfuncs or name in self.containsanyfuncs): - if isinstance(node.args[0], ast.Str): - varname = node.args[0].s + if isinstance(node.args[0], ast.Constant) and isinstance(node.args[0].value, str): + varname = node.args[0].value if name in self.containsfuncs and isinstance(node.args[1], ast.Str): if varname not in self.contains: self.contains[varname] = set() |