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 <niels@thykier.net>
ubuntu/rebased
Niels Thykier 7 years ago
parent 92817767b6
commit d3638cc08f

@ -108,6 +108,10 @@ class AutopkgtestPolicy(BasePolicy):
os.makedirs(self.options.state_dir, exist_ok=True) os.makedirs(self.options.state_dir, exist_ok=True)
self.read_pending_tests() 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 # read the cached results that we collected so far
if os.path.exists(self.results_cache_file): if os.path.exists(self.results_cache_file):
with open(self.results_cache_file) as f: with open(self.results_cache_file) as f:

Loading…
Cancel
Save