summaryrefslogtreecommitdiffstats
path: root/meta/classes/license.bbclass
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2021-10-13 16:10:24 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-14 22:32:50 +0100
commit09ca5e87ec3e19303587c3534e6445ff1d70e473 (patch)
treed74c39ac0bf8ff4c0aafdfc2bbe5cc3a721a7bd7 /meta/classes/license.bbclass
parentb6611957cc19b70c51e49af8552f81e0a347a393 (diff)
downloadpoky-09ca5e87ec3e19303587c3534e6445ff1d70e473.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: 875a944392a3c93f40081a14af357f70b6b8264f) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/license.bbclass')
-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 45d912741d..7a34e185c7 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -145,6 +145,10 @@ def find_license_files(d):
145 find_license(node.s.replace("+", "").replace("*", "")) 145 find_license(node.s.replace("+", "").replace("*", ""))
146 self.generic_visit(node) 146 self.generic_visit(node)
147 147
148 def visit_Constant(self, node):
149 find_license(node.value.replace("+", "").replace("*", ""))
150 self.generic_visit(node)
151
148 def find_license(license_type): 152 def find_license(license_type):
149 try: 153 try:
150 bb.utils.mkdirhier(gen_lic_dest) 154 bb.utils.mkdirhier(gen_lic_dest)