From d86c7b9c7a9a48d2fd2c2aad70f2c02c708e43d3 Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Sat, 25 Apr 2015 18:23:44 +0200 Subject: [PATCH] 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 --- britney.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/britney.py b/britney.py index c76f16e..791ee4a 100755 --- a/britney.py +++ b/britney.py @@ -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