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

Unified Diff: tools/licenses.py

Issue 1121003: Pass license-checker script for base/third_party/*. (Closed)
Patch Set: Created 10 years, 9 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
Index: tools/licenses.py
diff --git a/tools/licenses.py b/tools/licenses.py
index d2262ebc3f8602ceb65a80d7b9bcd5a1772f42a4..1b935c93d227c58ae61e32c83cc99c5b68fe6ec4 100755
--- a/tools/licenses.py
+++ b/tools/licenses.py
@@ -26,10 +26,11 @@ def ParseDir(path):
raise LicenseError("missing README.chromium")
# Parse metadata fields out of README.chromium.
+ # We provide a default value of "LICENSE" for the license file.
metadata = {
- "License File": None, # Relative path to license text.
- "Name": None, # Short name (for header on about:credits).
- "URL": None, # Project home page.
+ "License File": "LICENSE", # Relative path to license text.
+ "Name": None, # Short name (for header on about:credits).
+ "URL": None, # Project home page.
}
for line in open(readme_path):
line = line.strip()
@@ -48,8 +49,9 @@ def ParseDir(path):
license_file = metadata["License File"]
license_path = os.path.join(path, license_file)
if not os.path.exists(license_path):
- raise LicenseError("README.chromium mentions license file '" +
- license_file + "' that doesn't exist")
+ raise LicenseError("License file '" + license_file + "' doesn't exist. "
+ "Either add a 'License File:' section to "
+ "README.chromium or add the missing file.")
return metadata
« base/third_party/nss/README.chromium ('K') | « base/third_party/xdg_user_dirs/README.chromium ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698