From 2f3cbbbdf8aa1bfbfa1769a4d3060d9d04a54e8c Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Sat, 23 Nov 2024 14:25:07 -0600 Subject: [PATCH] Catch KeyError explicitly in the autopkgtest policy to reduce the log size --- britney2/policies/autopkgtest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/britney2/policies/autopkgtest.py b/britney2/policies/autopkgtest.py index 13c0ec0..c7549c8 100644 --- a/britney2/policies/autopkgtest.py +++ b/britney2/policies/autopkgtest.py @@ -764,6 +764,8 @@ class AutopkgtestPolicy(BasePolicy): self.logger.info('Source package %s has binaries which are NOT Architecture: all, and tests have been requested on %s, running tests for this package', src, arch) + except KeyError as err: + self.logger.error('i386 useless autopkgtest check failed with: KeyError: %s', err) except Exception: self.logger.error('i386 useless autopkgtest check failed with: %s', traceback.format_exc())