@ -338,18 +338,20 @@ 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 :
self . logger . info ( ' Applying bounty for %s granted by %s : %d days ' ,
if excuse . bounty [ bounty ] :
source_name , bounty , excuse . bounty [ bounty ] )
self . logger . info ( ' Applying bounty for %s granted by %s : %d days ' ,
excuse . addhtml ( ' Required age reduced by %d days because of %s ' %
source_name , bounty , excuse . bounty [ bounty ] )
( excuse . bounty [ bounty ] , bounty ) )
excuse . addhtml ( ' Required age reduced by %d days because of %s ' %
min_days - = excuse . bounty [ bounty ]
( excuse . bounty [ 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 :
self . logger . info ( ' Applying penalty for %s given by %s : %d days ' ,
if excuse . penalty [ penalty ] :
source_name , penalty , excuse . penalty [ penalty ] )
self . logger . info ( ' Applying penalty for %s given by %s : %d days ' ,
excuse . addhtml ( ' Required age increased by %d days because of %s ' %
source_name , penalty , excuse . penalty [ penalty ] )
( excuse . penalty [ penalty ] , penalty ) )
excuse . addhtml ( ' Required age increased by %d days because of %s ' %
min_days + = excuse . penalty [ penalty ]
( excuse . penalty [ penalty ] , penalty ) )
min_days + = excuse . penalty [ penalty ]
# the age in BOUNTY_MIN_AGE can be higher than the one associated with
# the age in BOUNTY_MIN_AGE can be higher than the one associated with
# the real urgency, so don't forget to take it into account
# the real urgency, so don't forget to take it into account