From 2f1acffae165f3e1af2ac802f68f937472be0b00 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 28 Oct 2016 00:09:55 +0200 Subject: [PATCH] Save policy state before upgrade tester We might not (want to) run the upgrade tester for some use cases, but we still need to save the policy state. --- britney.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/britney.py b/britney.py index 1cb0db7..6ceb6ea 100755 --- a/britney.py +++ b/britney.py @@ -2743,9 +2743,6 @@ class Britney(object): write_controlfiles(self.sources, self.binaries, 'testing', self.options.testing) - for policy in self.policies: - policy.save_state(self) - # write HeidiResult self.log("Writing Heidi results to %s" % self.options.heidi_output) write_heidi(self.options.heidi_output, self.sources["testing"], @@ -2999,6 +2996,9 @@ class Britney(object): else: self.upgrade_me = self.options.actions.split() + for policy in self.policies: + policy.save_state(self) + with open(self.options.upgrade_output, 'w', encoding='utf-8') as f: self.__output = f