Skip second-stage upgrade testing if UPGRADE_OUTPUT option is absent or empty

This is useful to speed up britney in dry run mode, if we are only interested
in builds and package tests.
pre-rebase-2016-12-12
Martin Pitt 9 years ago committed by Martin Pitt
parent 2f1acffae1
commit 69ab5f6c32

@ -2999,6 +2999,13 @@ class Britney(object):
for policy in self.policies: for policy in self.policies:
policy.save_state(self) policy.save_state(self)
# skip upgrade testing if UPGRADE_OUTPUT option is absent or empty
try:
if not self.options.upgrade_output:
return
except AttributeError:
return
with open(self.options.upgrade_output, 'w', encoding='utf-8') as f: with open(self.options.upgrade_output, 'w', encoding='utf-8') as f:
self.__output = f self.__output = f

Loading…
Cancel
Save