[pypi] Very old releases don't have data on the API

See https://pypi.org/pypi/numpy/json
This commit is contained in:
Nemo
2022-10-17 14:15:16 +05:30
committed by Nemo
parent fac9620241
commit 706b5e218b
2 changed files with 4 additions and 1 deletions

View File

@@ -11,3 +11,6 @@ trim_trailing_whitespace = true
indent_style = space
indent_size = 2
insert_final_newline = true
[*.py]
indent_size = 4

View File

@@ -32,7 +32,7 @@ def fetch_releases(pypi_id, regex):
for r in regex:
if re.match(r, version):
matches = True
if matches:
if matches and R:
d = datetime.fromisoformat(R[0]["upload_time"]).strftime("%Y-%m-%d")
releases[version] = d
print("%s: %s" % (version, d))