Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2064)

Unified Diff: android_webview/tools/webview_licenses.py

Issue 11421199: Update webview license tool to match licenses.py. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/tools/webview_licenses.py
diff --git a/android_webview/tools/webview_licenses.py b/android_webview/tools/webview_licenses.py
index fe9c9c8311ace6896d22f046a69e0c08f56097a5..d26a1a515db2f9526e1904153e725cc0c5b9bcf0 100755
--- a/android_webview/tools/webview_licenses.py
+++ b/android_webview/tools/webview_licenses.py
@@ -58,8 +58,12 @@ def GetIncompatibleDirectories():
if directory in known_issues.KNOWN_ISSUES:
result.append(directory)
continue
- metadata = licenses.ParseDir(directory, REPOSITORY_ROOT,
- require_license_file=False)
+ try:
+ metadata = licenses.ParseDir(directory, REPOSITORY_ROOT,
+ require_license_file=False)
+ except licenses.LicenseError as e:
+ print 'Got LicenseError while scanning ' + directory
+ raise
if metadata.get('License Android Compatible', 'no') == 'yes':
continue
license = re.split(' [Ll]icenses?$', metadata['License'])[0]
@@ -189,7 +193,8 @@ def _FindThirdPartyDirs():
# Binaries doesn't apply to android
os.path.join('third_party', 'widevine'),
]
- return licenses.FindThirdPartyDirs(prune_paths, REPOSITORY_ROOT)
+ third_party_dirs = licenses.FindThirdPartyDirs(prune_paths, REPOSITORY_ROOT)
+ return licenses.FilterDirsWithFiles(third_party_dirs, REPOSITORY_ROOT)
def _Scan():
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698