summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2021-12-10 11:08:14 +0000
committerAnuj Mittal <anuj.mittal@intel.com>2021-12-13 12:19:03 +0800
commit067fbe5e12a81225cf3ff436837af6a6d23040a6 (patch)
tree9f3f83a168c8564ade134bcf1a35a67ae5179751
parentc96241ac8e18f4ae87ec05b722a0bbfb017df578 (diff)
downloadopenembedded-core-contrib-067fbe5e12a81225cf3ff436837af6a6d23040a6.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: Anuj Mittal <anuj.mittal@intel.com>
-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):
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)