Replace a for-loop with any()

ubuntu/rebased
Niels Thykier 7 years ago
parent 70947f4c21
commit 8753649e54

@ -308,10 +308,8 @@ class Excuse(object):
dep_data['unsatisfiable-dependencies'] = {x: sorted(self.unsat_deps[x]) for x in self.unsat_deps} dep_data['unsatisfiable-dependencies'] = {x: sorted(self.unsat_deps[x]) for x in self.unsat_deps}
if self.needs_approval: if self.needs_approval:
status = 'not-approved' status = 'not-approved'
for h in self.hints: if any(h.type == 'unblock' for h in self.hints):
if h.type == 'unblock': status = 'approved'
status = 'approved'
break
excusedata['manual-approval-status'] = status excusedata['manual-approval-status'] = status
if self.hints: if self.hints:
hint_info = [{ hint_info = [{

Loading…
Cancel
Save