diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2023-01-19 16:39:20 +0300 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2023-01-19 19:24:28 +0300 |
commit | 87009cdc1b35968c61317dfe5375f5126ec44918 (patch) | |
tree | d6fbc3c7e260b3d53faaedeb48a01934f8b00720 | |
parent | d77b94da78034219f9b5d89ecfe4fc24562cd344 (diff) |
Don't add duplicate license keys
Don't add a custom keys to license_expression's database, if it's
already present.
Also drop unneeded 'XVIEW' license.
-rwxr-xr-x | calm/hint.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/calm/hint.py b/calm/hint.py index 6034c1d..1ec86d9 100755 --- a/calm/hint.py +++ b/calm/hint.py @@ -39,10 +39,10 @@ else: extra_licenses = [ 'Linux-man-pages-copyleft', # requires SPDX license-list 3.15 'Public-Domain', - 'XVIEW', ] for l in extra_licenses: - json.append({"spdx_license_key": l}) + if not any(j["spdx_license_key"] == l for j in json): + json.append({"spdx_license_key": l}) licensing = license_expression.build_spdx_licensing(json) # types of key: |