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-26 18:20:10 +02:00 committed by Niels Thykier
parent e8c84e8cc7
commit 7b0138ecb7

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