summaryrefslogtreecommitdiffstats
path: root/android_webview/tools/webview_licenses.py
diff options
context:
space:
mode:
Diffstat (limited to 'android_webview/tools/webview_licenses.py')
-rwxr-xr-xandroid_webview/tools/webview_licenses.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/android_webview/tools/webview_licenses.py b/android_webview/tools/webview_licenses.py
index 8293862..07515ca 100755
--- a/android_webview/tools/webview_licenses.py
+++ b/android_webview/tools/webview_licenses.py
@@ -30,6 +30,7 @@ REPOSITORY_ROOT = os.path.abspath(os.path.join(
sys.path.append(os.path.join(REPOSITORY_ROOT, 'tools'))
import licenses
+import known_issues
def GetIncompatibleDirectories():
"""Gets a list of third-party directories which use licenses incompatible
@@ -53,6 +54,9 @@ def GetIncompatibleDirectories():
regex = '^(%s)$' % '|'.join(whitelist)
result = []
for directory in _FindThirdPartyDirs():
+ if directory in known_issues.KNOWN_ISSUES:
+ result.append(directory)
+ continue
metadata = licenses.ParseDir(directory, REPOSITORY_ROOT,
require_license_file=False)
if metadata.get('License Android Compatible', 'no') == 'yes':
@@ -168,6 +172,9 @@ def _FindThirdPartyDirs():
The list of third-party directories.
"""
+ # Please don't add here paths that have problems with license files,
+ # as they will end up included in Android WebView snapshot.
+ # Instead, add them into known_issues.py.
prune_paths = [
# Placeholder directory, no third-party code.
os.path.join('third_party', 'adobe'),
@@ -198,8 +205,9 @@ def _Scan():
try:
licenses.ParseDir(path, REPOSITORY_ROOT)
except licenses.LicenseError, e:
- print 'Got LicenseError "%s" while scanning %s' % (e, path)
- all_licenses_valid = False
+ if not (path in known_issues.KNOWN_ISSUES):
+ print 'Got LicenseError "%s" while scanning %s' % (e, path)
+ all_licenses_valid = False
# Second, check for non-standard license text.
files_data = _ReadFile(os.path.join('android_webview', 'tools',