From d3638cc08f2b96f3c182830cd6b07076bf33d11e Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Sun, 29 Apr 2018 07:19:00 +0000 Subject: [PATCH] Make adt_baseline config optional Given that only one value is defined ("reference"), it is a better option to allow the config to be unset when one does not want to have adt_baseline set to "reference". Signed-off-by: Niels Thykier --- britney2/policies/autopkgtest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/britney2/policies/autopkgtest.py b/britney2/policies/autopkgtest.py index 6a5c92a..6bdb630 100644 --- a/britney2/policies/autopkgtest.py +++ b/britney2/policies/autopkgtest.py @@ -108,6 +108,10 @@ class AutopkgtestPolicy(BasePolicy): os.makedirs(self.options.state_dir, exist_ok=True) self.read_pending_tests() + if not hasattr(self.options, 'adt_baseline'): + # Make adt_baseline optional + setattr(self.options, 'adt_baseline', None) + # read the cached results that we collected so far if os.path.exists(self.results_cache_file): with open(self.results_cache_file) as f: