From 9c09500d72da522b68320bc05f27316932a66b4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Tue, 21 Nov 2023 19:07:53 +0100 Subject: [PATCH] Handle more gracefully the lack of access to result containers. --- britney2/policies/autopkgtest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/britney2/policies/autopkgtest.py b/britney2/policies/autopkgtest.py index bfed186..c284082 100644 --- a/britney2/policies/autopkgtest.py +++ b/britney2/policies/autopkgtest.py @@ -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