From 65b102921674d19dcb2e97ee9f9bf9ee9e5378cf Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 7 Sep 2020 13:16:08 +0300 Subject: [PATCH] Host SPDX licenses on Bintray, Github is blocked in multiple countries --- platformio/package/manifest/schema.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/platformio/package/manifest/schema.py b/platformio/package/manifest/schema.py index 39327f4a..a86f1fda 100644 --- a/platformio/package/manifest/schema.py +++ b/platformio/package/manifest/schema.py @@ -242,7 +242,7 @@ class ManifestSchema(BaseSchema): raise ValidationError("Could not load SPDX licenses for validation") for item in spdx.get("licenses", []): if item.get("licenseId") == value: - return + return True raise ValidationError( "Invalid SPDX license identifier. See valid identifiers at " "https://spdx.org/licenses/" @@ -251,9 +251,5 @@ class ManifestSchema(BaseSchema): @staticmethod @memoized(expire="1h") def load_spdx_licenses(): - version = "3.10" - spdx_data_url = ( - "https://raw.githubusercontent.com/spdx/license-list-data" - "/v%s/json/licenses.json" % version - ) + spdx_data_url = "https://dl.bintray.com/platformio/dl-misc/spdx-licenses-3.json" return json.loads(fetch_remote_content(spdx_data_url))