Fix repo state error handling in pkglistgen

repository_arch_state doesn't raise HTTPError for 404 any more, but that's what
pkglistgen uses to skip that repo/arch. Handle None as replacement instead.
This commit is contained in:
Fabian Vogt 2021-02-15 14:42:32 +01:00
parent 2caa5a9e00
commit 440b0f7def

View File

@ -330,10 +330,11 @@ class PkgListGen(ToolBase.ToolBase):
if not os.path.exists(d):
os.makedirs(d)
try:
# Fetch state before mirroring in-case it changes during download.
state = repository_arch_state(self.apiurl, project, repo, arch)
except HTTPError:
# Fetch state before mirroring in-case it changes during download.
state = repository_arch_state(self.apiurl, project, repo, arch)
if state is None:
# Repo might not have this architecture
continue
# Would be preferable to include hash in name, but cumbersome to handle without