diff options
author | Ross Burton <ross@burtonini.com> | 2021-10-13 16:10:24 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-14 22:31:56 +0100 |
commit | 875a944392a3c93f40081a14af357f70b6b8264f (patch) | |
tree | 088de341e86566caae14173dd736f8d16d4d6ee1 /meta/classes | |
parent | abc93390a3f19bc4cc159c5690a478b9e2270906 (diff) | |
download | openembedded-core-875a944392a3c93f40081a14af357f70b6b8264f.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>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/license.bbclass | 4 |
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) |