From 4a7a3ac0fdb069ea4190a826b4bccd10babddf5b Mon Sep 17 00:00:00 2001 From: "evan@chromium.org" Date: Thu, 18 Mar 2010 22:36:41 +0000 Subject: Pass license-checker script for base/third_party/*. License checker change: Since most projects have a LICENSE file, look for that by default. Since as far as I can tell NSS and NSPR are both just MPL tri-license without a per project copyright, I think I will amend the license-checker to source those licenses separately. Review URL: http://codereview.chromium.org/1121003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42016 0039d316-1c4b-4281-b951-d872f2087c98 --- tools/licenses.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'tools') diff --git a/tools/licenses.py b/tools/licenses.py index d2262eb..1b935c9 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 -- cgit v1.1