Hedge the zone counts out of going stale, and name a tarball member that is no file
Tests / vet + fmt + tests (pull_request) Successful in 1m24s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped

This commit is contained in:
2026-09-18 23:26:32 +02:00
parent 784a2f0c0c
commit 85d4760cde
4 changed files with 12 additions and 9 deletions
+5 -2
View File
@@ -27,9 +27,12 @@ REGIONS = ["africa", "antarctica", "asia", "australasia", "backward", "etcetera"
def member(tar, name):
try:
return tar.extractfile(name).read().decode("utf-8")
f = tar.extractfile(name)
except KeyError:
sys.exit(f"{name}: the tarball no longer holds it; the tzdb layout has moved")
f = None
if f is None:
sys.exit(f"{name}: the tarball no longer holds it as a file; the tzdb layout has moved")
return f.read().decode("utf-8")
def offsets(tar):