From 5f2a84a4f801ad8dc72da9f6ea8e800df0507914 Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Mon, 19 Dec 2016 17:59:54 +0000 Subject: [PATCH] Remove redundant if-else - if branch is always true Signed-off-by: Niels Thykier --- britney2/policies/policy.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/britney2/policies/policy.py b/britney2/policies/policy.py index 7b100ad..5bbbf39 100644 --- a/britney2/policies/policy.py +++ b/britney2/policies/policy.py @@ -97,10 +97,8 @@ class BasePolicy(object): pass 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] + pinfo = {} + general_policy_info[self.policy_id] = pinfo return self.apply_policy_impl(pinfo, suite, source_name, source_data_tdist, source_data_srcdist, excuse) @abstractmethod