mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-04-28 19:41:11 +00:00
Display bounty/penalty information only if they would actually be changing anything
This avoid messages like Required age reduced by 0 days because of autopkgtest that is hardly useful. Signed-off-by: Mattia Rizzolo <mattia@debian.org>
This commit is contained in:
parent
40aa315c0c
commit
bc0fb3f61d
@ -338,6 +338,7 @@ class AgePolicy(BasePolicy):
|
|||||||
days_old = self._date_now - self._dates[source_name][1]
|
days_old = self._date_now - self._dates[source_name][1]
|
||||||
min_days = self._min_days[urgency]
|
min_days = self._min_days[urgency]
|
||||||
for bounty in excuse.bounty:
|
for bounty in excuse.bounty:
|
||||||
|
if excuse.bounty[bounty]:
|
||||||
self.logger.info('Applying bounty for %s granted by %s: %d days',
|
self.logger.info('Applying bounty for %s granted by %s: %d days',
|
||||||
source_name, bounty, excuse.bounty[bounty])
|
source_name, bounty, excuse.bounty[bounty])
|
||||||
excuse.addhtml('Required age reduced by %d days because of %s' %
|
excuse.addhtml('Required age reduced by %d days because of %s' %
|
||||||
@ -345,6 +346,7 @@ class AgePolicy(BasePolicy):
|
|||||||
min_days -= excuse.bounty[bounty]
|
min_days -= excuse.bounty[bounty]
|
||||||
if urgency not in self._penalty_immune_urgencies:
|
if urgency not in self._penalty_immune_urgencies:
|
||||||
for penalty in excuse.penalty:
|
for penalty in excuse.penalty:
|
||||||
|
if excuse.penalty[penalty]:
|
||||||
self.logger.info('Applying penalty for %s given by %s: %d days',
|
self.logger.info('Applying penalty for %s given by %s: %d days',
|
||||||
source_name, penalty, excuse.penalty[penalty])
|
source_name, penalty, excuse.penalty[penalty])
|
||||||
excuse.addhtml('Required age increased by %d days because of %s' %
|
excuse.addhtml('Required age increased by %d days because of %s' %
|
||||||
|
Loading…
x
Reference in New Issue
Block a user