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

Unified Diff: android_webview/tools/webview_licenses.py

Issue 324813006: Add known_incompatible.py items to the blacklist in deps_whitelist.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update for feedback. Created 6 years, 6 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 | « android_webview/buildbot/deps_whitelist.py ('k') | 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 d2775e7fc5d4357a670d40a9ddd300ff2506c34f..b0c4b9c2e8541164ba091ef49a2bcfae5a919a78 100755
--- a/android_webview/tools/webview_licenses.py
+++ b/android_webview/tools/webview_licenses.py
@@ -297,6 +297,13 @@ def GenerateNoticeFile():
return '\n'.join(content)
+def _ProcessIncompatibleResult(incompatible_directories):
+ if incompatible_directories:
+ print ("Incompatibly licensed directories found:\n" +
+ "\n".join(sorted(incompatible_directories)))
+ return ScanResult.Errors
+ return ScanResult.Ok
+
def main():
class FormatterWithNewLines(optparse.IndentedHelpFormatter):
def format_description(self, description):
@@ -308,10 +315,13 @@ def main():
usage='%prog [options]')
parser.description = (__doc__ +
'\nCommands:\n' \
- ' scan Check licenses.\n' \
- ' notice Generate Android NOTICE file on stdout. \n' \
+ ' scan Check licenses.\n' \
+ ' notice Generate Android NOTICE file on stdout.\n' \
' incompatible_directories Scan for incompatibly'
- ' licensed directories.')
+ ' licensed directories.\n'
+ ' all_incompatible_directories Scan for incompatibly'
+ ' licensed directories (even those in'
+ ' known_issues.py).\n')
(_, args) = parser.parse_args()
if len(args) != 1:
parser.print_help()
@@ -326,13 +336,9 @@ def main():
print GenerateNoticeFile()
return ScanResult.Ok
elif args[0] == 'incompatible_directories':
- incompatible_directories = GetUnknownIncompatibleDirectories()
- if incompatible_directories:
- print ("Incompatibly licensed directories found:\n" +
- "\n".join(sorted(incompatible_directories)))
- return ScanResult.Errors
- return ScanResult.Ok
-
+ return _ProcessIncompatibleResult(GetUnknownIncompatibleDirectories())
+ elif args[0] == 'all_incompatible_directories':
+ return _ProcessIncompatibleResult(GetIncompatibleDirectories())
parser.print_help()
return ScanResult.Errors
« no previous file with comments | « android_webview/buildbot/deps_whitelist.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698