diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2025-09-09 19:17:14 +0200 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2025-09-22 12:21:23 -0700 |
commit | 59e8e23b75e452f913f4241a593a72c44e938200 (patch) | |
tree | 2da38a4a377f73649db87617698c9221b613a865 | |
parent | 89e6b6c8520cb397a5214f166a1422a9d5eb1827 (diff) | |
download | poky-59e8e23b75e452f913f4241a593a72c44e938200.tar.gz |
license.py: avoid deprecated ast.Str
* it's deprecated since python-3.12 and removed in 3.14 causing:
openembedded-core/meta/lib/oe/license.py', lineno: 176, function: visit
0172:
0173: LicenseVisitor.__init__(self)
0174:
0175: def visit(self, node):
*** 0176: if isinstance(node, ast.Str):
0177: lic = node.s
0178:
0179: if license_ok(self._canonical_license(self._d, lic),
0180: self._dont_want_licenses) == True:
Exception: AttributeError: module 'ast' has no attribute 'Str'
(From OE-Core rev: 73c0dcd28f843b61edaa17fbc4037ef974f52adf)
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r-- | meta/lib/oe/license.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oe/license.py b/meta/lib/oe/license.py index 6f882c3812..6ff7688d22 100644 --- a/meta/lib/oe/license.py +++ b/meta/lib/oe/license.py | |||
@@ -173,8 +173,8 @@ class ManifestVisitor(LicenseVisitor): | |||
173 | LicenseVisitor.__init__(self) | 173 | LicenseVisitor.__init__(self) |
174 | 174 | ||
175 | def visit(self, node): | 175 | def visit(self, node): |
176 | if isinstance(node, ast.Str): | 176 | if isinstance(node, ast.Constant): |
177 | lic = node.s | 177 | lic = node.value |
178 | 178 | ||
179 | if license_ok(self._canonical_license(self._d, lic), | 179 | if license_ok(self._canonical_license(self._d, lic), |
180 | self._dont_want_licenses) == True: | 180 | self._dont_want_licenses) == True: |