From 0c73ebfa98f80ef676fb2c057c922a14ea3fd81e Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 18 Dec 2015 16:37:23 +0100 Subject: [PATCH] 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. --- britney.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/britney.py b/britney.py index 58fca8f..ff62ed2 100755 --- a/britney.py +++ b/britney.py @@ -2734,6 +2734,13 @@ class Britney(object): for policy in self.policies: 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: self.__output = f