summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2021-10-13 16:10:24 +0100
committerSteve Sakoman <steve@sakoman.com>2021-10-29 04:48:40 -1000
commitd91fe6ecb9fbb410b3bab6ced66b7fe5f869cf83 (patch)
tree858c1191528e9fbf8c898d2d9309c9ce21e23e32 /meta
parent18f10a51387cdee7c7058a3cb3f7c8c24c57c36a (diff)
downloadopenembedded-core-contrib-d91fe6ecb9fbb410b3bab6ced66b7fe5f869cf83.tar.gz
license.bbclass: implement ast.NodeVisitor.visit_Constant
Since Python 3.8 visit_Num(), visit_Str() and so on are all deprecated and replaced with visit_Constant. We can't yet remove the deprecated functions until we require 3.8, but we can implement visit_Constant to silence the deprecation warnings. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 875a944392a3c93f40081a14af357f70b6b8264f) Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/license.bbclass4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 73f99e87a8..6b03221c7f 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -153,6 +153,10 @@ def find_license_files(d):
find_license(node.s.replace("+", "").replace("*", ""))
self.generic_visit(node)
+ def visit_Constant(self, node):
+ find_license(node.value.replace("+", "").replace("*", ""))
+ self.generic_visit(node)
+
def find_license(license_type):
try:
bb.utils.mkdirhier(gen_lic_dest)