Skip to content

Commit

Permalink
*sigh*, unrelated pep8.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphbean committed Mar 5, 2014
1 parent 12d65d6 commit 7f2be37
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions fedbadges/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,18 @@ def matches(self, msg):
# Limit awardees to only those who do not already have this badge.
# Do this only if we have an active connection to the Tahrir DB.
if self.tahrir:
awardees = frozenset([user for user in awardees
if not self.tahrir.assertion_exists(
self.badge_id, "%s@fedoraproject.org" % user
)])
awardees = frozenset([
user for user in awardees
if not self.tahrir.assertion_exists(
self.badge_id, "%s@fedoraproject.org" % user
)])

# Also, exclude any potential awardees who have opted out.
awardees = frozenset([user for user in awardees
if not self.tahrir.person_opted_out(
"%s@fedoraproject.org" % user
)])
awardees = frozenset([
user for user in awardees
if not self.tahrir.person_opted_out(
"%s@fedoraproject.org" % user
)])

# If no-one would get the badge at this point, then no reason to waste
# time doing any further checks. No need to query datanommer.
Expand Down

0 comments on commit 7f2be37

Please sign in to comment.