Fix urgency reading to obey 'low'

Set the default to maxint until we've read something.

Reported-by: Ivo De Decker <ivo.dedecker@ugent.be>
Signed-off-by: Julien Cristau <jcristau@debian.org>
debian
Julien Cristau 11 years ago
parent 2f753eab70
commit 7eef861a15

@ -755,8 +755,8 @@ class Britney(object):
if len(l) != 3: continue if len(l) != 3: continue
# read the minimum days associated with the urgencies # read the minimum days associated with the urgencies
urgency_old = urgencies.get(l[0], self.options.default_urgency) urgency_old = urgencies.get(l[0], None)
mindays_old = self.MINDAYS.get(urgency_old, self.MINDAYS[self.options.default_urgency]) mindays_old = self.MINDAYS.get(urgency_old, sys.maxint)
mindays_new = self.MINDAYS.get(l[2], self.MINDAYS[self.options.default_urgency]) mindays_new = self.MINDAYS.get(l[2], self.MINDAYS[self.options.default_urgency])
# if the new urgency is lower (so the min days are higher), do nothing # if the new urgency is lower (so the min days are higher), do nothing

Loading…
Cancel
Save