Add age changes due to penalties or bounties to the excuses output

ubuntu/rebased
Paul Gevers 7 years ago
parent f2f20eb460
commit b553b205ce
No known key found for this signature in database
GPG Key ID: 9C5C99EB05BD750A

@ -284,12 +284,16 @@ class AgePolicy(BasePolicy):
for bounty in excuse.bounty:
self.log('Applying bounty for %s granted by %s: %d days' %
(source_name, bounty, excuse.bounty[bounty]))
excuse.addhtml('Required age reduced by %d days because of %s' %
(excuse.bounty[bounty], bounty))
min_days -= excuse.bounty[bounty]
if not hasattr(self.options, 'no_penalties') or \
urgency not in self.options.no_penalties:
for penalty in excuse.penalty:
self.log('Applying penalty for %s given by %s: %d days' %
(source_name, penalty, excuse.penalty[penalty]))
excuse.addhtml('Required age increased by %d days because of %s' %
(excuse.penalty[penalty], penalty))
min_days += excuse.penalty[penalty]
try:
bounty_min_age = int(self.options.bounty_min_age)

Loading…
Cancel
Save