Skip to content

Commit 65b1029

Browse files
committed
Host SPDX licenses on Bintray, Github is blocked in multiple countries
1 parent c7758fd commit 65b1029

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

platformio/package/manifest/schema.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def validate_license(self, value):
242242
raise ValidationError("Could not load SPDX licenses for validation")
243243
for item in spdx.get("licenses", []):
244244
if item.get("licenseId") == value:
245-
return
245+
return True
246246
raise ValidationError(
247247
"Invalid SPDX license identifier. See valid identifiers at "
248248
"https://spdx.org/licenses/"
@@ -251,9 +251,5 @@ def validate_license(self, value):
251251
@staticmethod
252252
@memoized(expire="1h")
253253
def load_spdx_licenses():
254-
version = "3.10"
255-
spdx_data_url = (
256-
"https://raw.githubusercontent.com/spdx/license-list-data"
257-
"/v%s/json/licenses.json" % version
258-
)
254+
spdx_data_url = "https://dl.bintray.com/platformio/dl-misc/spdx-licenses-3.json"
259255
return json.loads(fetch_remote_content(spdx_data_url))

0 commit comments

Comments
 (0)