From 0868962ee3fcf3acaeefee521a597203566efcc4 Mon Sep 17 00:00:00 2001 From: Paul Gevers Date: Tue, 7 Aug 2018 08:47:14 +0200 Subject: [PATCH] autopkgtest: Ignore triggers without a forward slash They are manual triggers in the name of britney, most likely by mistake (but those happen). Closes: #905600 --- britney2/policies/autopkgtest.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/britney2/policies/autopkgtest.py b/britney2/policies/autopkgtest.py index 69c04a2..5a30f1d 100644 --- a/britney2/policies/autopkgtest.py +++ b/britney2/policies/autopkgtest.py @@ -666,7 +666,11 @@ class AutopkgtestPolicy(BasePolicy): # If a test runs because of its own package (newer version), ensure # that we got a new enough version; FIXME: this should be done more # generically by matching against testpkg-versions - (trigsrc, trigver) = trigger.split('/', 1) + try: + (trigsrc, trigver) = trigger.split('/', 1) + except ValueError: + self.logger.error('Ignoring invalid test trigger %s', trigger) + return if trigsrc == src and apt_pkg.version_compare(ver, trigver) < 0: self.logger.error('test trigger %s, but run for older version %s, ignoring', trigger, ver) return