diff --git a/britney.py b/britney.py index 5bbfa20..c715e3e 100755 --- a/britney.py +++ b/britney.py @@ -1613,7 +1613,7 @@ class Britney(object): policy_verdict = PolicyVerdict.PASS for policy in self.policies: if suite in policy.applicable_suites: - v = policy.apply_policy(policy_info, suite, src, source_t, source_u) + v = policy.apply_policy(policy_info, suite, src, source_t, source_u, excuse) if v.value > policy_verdict.value: policy_verdict = v diff --git a/policies/policy.py b/policies/policy.py index 19ece2c..31f74e8 100644 --- a/policies/policy.py +++ b/policies/policy.py @@ -93,15 +93,15 @@ class BasePolicy(object): pass - def apply_policy(self, general_policy_info, suite, source_name, source_data_tdist, source_data_srcdist): + def apply_policy(self, general_policy_info, suite, source_name, source_data_tdist, source_data_srcdist, excuse): if self.policy_id not in general_policy_info: general_policy_info[self.policy_id] = pinfo = {} else: pinfo = general_policy_info[self.policy_id] - return self.apply_policy_impl(pinfo, suite, source_name, source_data_tdist, source_data_srcdist) + return self.apply_policy_impl(pinfo, suite, source_name, source_data_tdist, source_data_srcdist, excuse) @abstractmethod - def apply_policy_impl(self, policy_info, suite, source_name, source_data_tdist, source_data_srcdist): + def apply_policy_impl(self, policy_info, suite, source_name, source_data_tdist, source_data_srcdist, excuse): """Apply a policy on a given source migration Britney will call this method on a given source package, when @@ -227,7 +227,7 @@ class AgePolicy(BasePolicy): super().save_state(britney) self._write_dates_file() - def apply_policy_impl(self, age_info, suite, source_name, source_data_tdist, source_data_srcdist): + def apply_policy_impl(self, age_info, suite, source_name, source_data_tdist, source_data_srcdist, excuse): # retrieve the urgency for the upload, ignoring it if this is a NEW package (not present in testing) urgency = self._urgencies.get(source_name, self.options.default_urgency) @@ -419,7 +419,7 @@ class RCBugPolicy(BasePolicy): self._bugs['unstable'] = self._read_bugs(filename_unstable) self._bugs['testing'] = self._read_bugs(filename_testing) - def apply_policy_impl(self, rcbugs_info, suite, source_name, source_data_tdist, source_data_srcdist): + def apply_policy_impl(self, rcbugs_info, suite, source_name, source_data_tdist, source_data_srcdist, excuse): bugs_t = set() bugs_u = set()