mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 21:49:33 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
b6611957cc
commit
09ca5e87ec
@@ -145,6 +145,10 @@ def find_license_files(d):
|
|||||||
find_license(node.s.replace("+", "").replace("*", ""))
|
find_license(node.s.replace("+", "").replace("*", ""))
|
||||||
self.generic_visit(node)
|
self.generic_visit(node)
|
||||||
|
|
||||||
|
def visit_Constant(self, node):
|
||||||
|
find_license(node.value.replace("+", "").replace("*", ""))
|
||||||
|
self.generic_visit(node)
|
||||||
|
|
||||||
def find_license(license_type):
|
def find_license(license_type):
|
||||||
try:
|
try:
|
||||||
bb.utils.mkdirhier(gen_lic_dest)
|
bb.utils.mkdirhier(gen_lic_dest)
|
||||||
|
|||||||
Reference in New Issue
Block a user