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>
This commit is contained in:
Julien Cristau 2015-04-25 18:23:44 +02:00 committed by Niels Thykier
parent 37ff82d1e0
commit d86c7b9c7a

View File

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