Don't crash if the urgencies file contains non-ascii

The live-2011-12-13 test set has random garbage in the middle.

Signed-off-by: Julien Cristau <jcristau@debian.org>
master
Julien Cristau 10 years ago committed by Niels Thykier
parent 37ff82d1e0
commit d86c7b9c7a

@ -783,7 +783,7 @@ class Britney(object):
urgencies = {} urgencies = {}
filename = os.path.join(basedir, "Urgency") filename = os.path.join(basedir, "Urgency")
self.__log("Loading upload urgencies from %s" % filename) self.__log("Loading upload urgencies from %s" % filename)
for line in open(filename): for line in open(filename, errors='surrogateescape'):
l = line.split() l = line.split()
if len(l) != 3: continue if len(l) != 3: continue

Loading…
Cancel
Save