From 8753649e543bfc79b9106286c403f354bbb72e6a Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Wed, 8 Aug 2018 16:14:48 +0000 Subject: [PATCH] Replace a for-loop with any() --- britney2/excuse.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/britney2/excuse.py b/britney2/excuse.py index d27a70a..59918a5 100644 --- a/britney2/excuse.py +++ b/britney2/excuse.py @@ -308,10 +308,8 @@ class Excuse(object): dep_data['unsatisfiable-dependencies'] = {x: sorted(self.unsat_deps[x]) for x in self.unsat_deps} if self.needs_approval: status = 'not-approved' - for h in self.hints: - if h.type == 'unblock': - status = 'approved' - break + if any(h.type == 'unblock' for h in self.hints): + status = 'approved' excusedata['manual-approval-status'] = status if self.hints: hint_info = [{