diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2025-09-09 19:17:33 +0200 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2025-09-22 13:17:52 -0700 |
commit | d2c6c66c1e496d42a70af6fadca3fe1e19bfcfd0 (patch) | |
tree | 19f912bdb6db06e09b3e85af0159a5c0622ddf83 | |
parent | 838a12c6216dc40e7cd4b811e4a1c99cb9958f40 (diff) | |
download | poky-d2c6c66c1e496d42a70af6fadca3fe1e19bfcfd0.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: df9898f13c261eeac2cc343569c843bc7dcaf163)
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 d9c8d94da4..ac5b296e60 100644 --- a/meta/lib/oe/license.py +++ b/meta/lib/oe/license.py | |||
@@ -172,8 +172,8 @@ class ManifestVisitor(LicenseVisitor): | |||
172 | LicenseVisitor.__init__(self) | 172 | LicenseVisitor.__init__(self) |
173 | 173 | ||
174 | def visit(self, node): | 174 | def visit(self, node): |
175 | if isinstance(node, ast.Str): | 175 | if isinstance(node, ast.Constant): |
176 | lic = node.s | 176 | lic = node.value |
177 | 177 | ||
178 | if license_ok(self._canonical_license(self._d, lic), | 178 | if license_ok(self._canonical_license(self._d, lic), |
179 | self._dont_want_licenses) == True: | 179 | self._dont_want_licenses) == True: |