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>
This commit is contained in:
Julien Cristau 2013-12-02 20:48:06 +01:00
parent d6adff3011
commit a2d1793ab6

View File

@ -755,8 +755,8 @@ class Britney(object):
if len(l) != 3: continue
# read the minimum days associated with the urgencies
urgency_old = urgencies.get(l[0], self.options.default_urgency)
mindays_old = self.MINDAYS.get(urgency_old, self.MINDAYS[self.options.default_urgency])
urgency_old = urgencies.get(l[0], None)
mindays_old = self.MINDAYS.get(urgency_old, sys.maxint)
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