Handle more gracefully the lack of access to result containers.

This commit is contained in:
Łukasz 'sil2100' Zemczak 2023-11-21 19:07:53 +01:00
parent ca29f24c23
commit 9c09500d72

View File

@ -1004,7 +1004,7 @@ class AutopkgtestPolicy(BasePolicy):
(url, f.getcode()))
except IOError as e:
# 401 "Unauthorized" is swift's way of saying "container does not exist"
if hasattr(e, 'code') and e.code == 401:
if hasattr(e, 'code') and (e.code == 401 or e.code == 404):
self.logger.info('fetch_swift_results: %s does not exist yet or is inaccessible', url)
return
# same as above in the swift authenticated case