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

Unified Diff: android_webview/tools/webview_licenses.py

Issue 133073008: Add an option to scan for incompatible folders to the WebView license tool. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months 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 4d865848ae6e0105f4fc1c7c4f576c158e0c0823..acd2a807b7cfec5f352c0c95ee39e22f74fe461c 100755
--- a/android_webview/tools/webview_licenses.py
+++ b/android_webview/tools/webview_licenses.py
@@ -34,7 +34,7 @@ import known_issues
def GetIncompatibleDirectories():
"""Gets a list of third-party directories which use licenses incompatible
- with Android. This is used by the snapshot tool.
+ with Android. This is used by the snapshot tool and the AOSP bot.
Returns:
A list of directories.
"""
@@ -282,8 +282,10 @@ def main():
parser.description = (__doc__ +
'\nCommands:\n' \
' scan Check licenses.\n' \
- ' notice Generate Android NOTICE file on stdout')
- (options, args) = parser.parse_args()
+ ' notice Generate Android NOTICE file on stdout. \n' \
+ ' incompatible_directories Scan for incompatibly'
+ ' licensed directories.')
+ (_, args) = parser.parse_args()
if len(args) != 1:
parser.print_help()
return ScanResult.Errors
@@ -296,6 +298,13 @@ def main():
elif args[0] == 'notice':
print GenerateNoticeFile()
return ScanResult.Ok
+ elif args[0] == 'incompatible_directories':
+ incompatible_directories = GetIncompatibleDirectories()
+ if incompatible_directories:
+ print ("Incompatibly licensed directories found:" +
+ "\n".join(incompatible_directories))
+ return ScanResult.Errors
+ return ScanResult.Ok
parser.print_help()
return ScanResult.Errors
« 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