summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/license.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oe/license.py')
-rw-r--r--meta/lib/oe/license.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/lib/oe/license.py b/meta/lib/oe/license.py
index ca385d5..04f5b31 100644
--- a/meta/lib/oe/license.py
+++ b/meta/lib/oe/license.py
@@ -13,8 +13,8 @@ def license_ok(license, dont_want_licenses):
13 # will exclude a trailing '+' character from LICENSE in 13 # will exclude a trailing '+' character from LICENSE in
14 # case INCOMPATIBLE_LICENSE is not a 'X+' license. 14 # case INCOMPATIBLE_LICENSE is not a 'X+' license.
15 lic = license 15 lic = license
16 if not re.search('\+$', dwl): 16 if not re.search(r'\+$', dwl):
17 lic = re.sub('\+', '', license) 17 lic = re.sub(r'\+', '', license)
18 if fnmatch(lic, dwl): 18 if fnmatch(lic, dwl):
19 return False 19 return False
20 return True 20 return True
@@ -40,8 +40,8 @@ class InvalidLicense(LicenseError):
40 return "invalid characters in license '%s'" % self.license 40 return "invalid characters in license '%s'" % self.license
41 41
42license_operator_chars = '&|() ' 42license_operator_chars = '&|() '
43license_operator = re.compile('([' + license_operator_chars + '])') 43license_operator = re.compile(r'([' + license_operator_chars + '])')
44license_pattern = re.compile('[a-zA-Z0-9.+_\-]+$') 44license_pattern = re.compile(r'[a-zA-Z0-9.+_\-]+$')
45 45
46class LicenseVisitor(ast.NodeVisitor): 46class LicenseVisitor(ast.NodeVisitor):
47 """Get elements based on OpenEmbedded license strings""" 47 """Get elements based on OpenEmbedded license strings"""