From b231a0815b2902a42332c190e509375e167559cb Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Tue, 21 Jul 2015 16:37:47 +0200 Subject: [PATCH] ansible: decode('utf-8', 'ignore') before logging b834dd6660a77379b2c693a36487352941a8e52d added decode('utf-8') which breaks when a substring inadevertendly cuts in the middle of a valid utf-8 sequence. Add the 'ignore' so the offending sequence is discarded instead of raising an error. Signed-off-by: Loic Dachary --- teuthology/task/ansible.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teuthology/task/ansible.py b/teuthology/task/ansible.py index ba792496a0..43071bb30d 100644 --- a/teuthology/task/ansible.py +++ b/teuthology/task/ansible.py @@ -29,7 +29,7 @@ class LoggerFile(object): self.level = level def write(self, string): - self.logger.log(self.level, string.decode('utf-8')) + self.logger.log(self.level, string.decode('utf-8', 'ignore')) def flush(self): pass -- 2.39.5