diff mbox series

license.py: drop visit_Str

Message ID 20250829090448.10066-1-martin.jansa@gmail.com
State New
Headers show
Series license.py: drop visit_Str | expand

Commit Message

Martin Jansa Aug. 29, 2025, 9:04 a.m. UTC
From: Martin Jansa <martin.jansa@gmail.com>

In https://git.openembedded.org/openembedded-core/commit/?h=kirkstone&id=abc93390a3f19bc4cc159c5690a478b9e2270906
visit_Constant was added for compatibility with Python 3.8 and newer, but
visit_Str was kept, because at that time bitbake did require Python 3.6.

Now latest bitbake requires 3.9 and even version 2.4 used in mickledore
builds requires 3.8 since:
https://git.openembedded.org/bitbake/commit/?h=2.4&id=744310f360d2288ac2ef07745abc86852126b5b9
so we can safely remove these.

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
 meta/lib/oe/license.py | 6 ------
 1 file changed, 6 deletions(-)
diff mbox series

Patch

diff --git a/meta/lib/oe/license.py b/meta/lib/oe/license.py
index ca779d3d83..bd28a247c9 100644
--- a/meta/lib/oe/license.py
+++ b/meta/lib/oe/license.py
@@ -84,9 +84,6 @@  class FlattenVisitor(LicenseVisitor):
         self.licenses = []
         LicenseVisitor.__init__(self)
 
-    def visit_Str(self, node):
-        self.licenses.append(node.s)
-
     def visit_Constant(self, node):
         self.licenses.append(node.value)
 
@@ -240,9 +237,6 @@  class ListVisitor(LicenseVisitor):
     def __init__(self):
         self.licenses = set()
 
-    def visit_Str(self, node):
-        self.licenses.add(node.s)
-
     def visit_Constant(self, node):
         self.licenses.add(node.value)