summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2021-10-13 16:10:24 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-03 11:18:56 +0000
commit990c499176629fa4d9a6f7cf01f0208d32723f45 (patch)
treee1da824b94a98b3b76fce72509814ed4e63f785d
parent0e3391131391cae16307bd7255311eb528605f25 (diff)
downloadpoky-990c499176629fa4d9a6f7cf01f0208d32723f45.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. (From OE-Core rev: d91fe6ecb9fbb410b3bab6ced66b7fe5f869cf83) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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):
153 find_license(node.s.replace("+", "").replace("*", "")) 153 find_license(node.s.replace("+", "").replace("*", ""))
154 self.generic_visit(node) 154 self.generic_visit(node)
155 155
156 def visit_Constant(self, node):
157 find_license(node.value.replace("+", "").replace("*", ""))
158 self.generic_visit(node)
159
156 def find_license(license_type): 160 def find_license(license_type):
157 try: 161 try:
158 bb.utils.mkdirhier(gen_lic_dest) 162 bb.utils.mkdirhier(gen_lic_dest)