summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oe/license.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/lib/oe/license.py b/meta/lib/oe/license.py
index 665d32e..b5d378a 100644
--- a/meta/lib/oe/license.py
+++ b/meta/lib/oe/license.py
@@ -74,6 +74,9 @@ class FlattenVisitor(LicenseVisitor):
74 def visit_Str(self, node): 74 def visit_Str(self, node):
75 self.licenses.append(node.s) 75 self.licenses.append(node.s)
76 76
77 def visit_Constant(self, node):
78 self.licenses.append(node.value)
79
77 def visit_BinOp(self, node): 80 def visit_BinOp(self, node):
78 if isinstance(node.op, ast.BitOr): 81 if isinstance(node.op, ast.BitOr):
79 left = FlattenVisitor(self.choose_licenses) 82 left = FlattenVisitor(self.choose_licenses)
@@ -227,6 +230,9 @@ class ListVisitor(LicenseVisitor):
227 def visit_Str(self, node): 230 def visit_Str(self, node):
228 self.licenses.add(node.s) 231 self.licenses.add(node.s)
229 232
233 def visit_Constant(self, node):
234 self.licenses.add(node.value)
235
230def list_licenses(licensestr): 236def list_licenses(licensestr):
231 """Simply get a list of all licenses mentioned in a license string. 237 """Simply get a list of all licenses mentioned in a license string.
232 Binary operators are not applied or taken into account in any way""" 238 Binary operators are not applied or taken into account in any way"""