Commit 53c22155 by Sébastien Eustace

Fix handling of full name licenses

parent 622d9c6c
...@@ -31,9 +31,17 @@ def load_licenses(): ...@@ -31,9 +31,17 @@ def load_licenses():
with open(licenses_file, encoding="utf-8") as f: with open(licenses_file, encoding="utf-8") as f:
data = json.loads(f.read()) data = json.loads(f.read())
for name, license in data.items(): for name, license_info in data.items():
_licenses[name.lower()] = License(name, license[0], license[1], license[2]) license = License(name, license_info[0], license_info[1], license_info[2])
_licenses[license[0].lower()] = _licenses[name.lower()] _licenses[name.lower()] = license
full_name = license_info[0].lower()
if full_name in _licenses:
existing_license = _licenses[full_name]
if not existing_license.is_deprecated:
continue
_licenses[full_name] = license
# Add a Proprietary license for non-standard licenses # Add a Proprietary license for non-standard licenses
_licenses["proprietary"] = License("Proprietary", "Proprietary", False, False) _licenses["proprietary"] = License("Proprietary", "Proprietary", False, False)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment