[elbe-devel] [PATCH v2 18/27] log: don't ignore, but replace decoding errors in async_logging

Torben Hohn torben.hohn at linutronix.de
Thu Sep 24 16:56:15 CEST 2020


lets be safe, so that no weird control characters show up in the
stream. This is supposed to be passed through soap -> lxml
And thaey seem to be picky.

Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
 elbepack/log.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elbepack/log.py b/elbepack/log.py
index db1fb770b..db3b4d246 100644
--- a/elbepack/log.py
+++ b/elbepack/log.py
@@ -246,7 +246,7 @@ class AsyncLogging(object):
 
         while True:
 
-            buf  = os.read(self.fd, self.atmost).decode("utf-8", errors="ignore")
+            buf  = os.read(self.fd, self.atmost).decode("utf-8", errors="replace")
 
             # Pipe broke
             if not buf:
-- 
2.20.1



More information about the elbe-devel mailing list