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

Bastian Germann bage at linutronix.de
Thu Sep 24 18:46:55 CEST 2020


Am 24.09.20 um 16:56 schrieb Torben Hohn:
> 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>

Reviewed-by: Bastian Germann <bage 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:
> 


More information about the elbe-devel mailing list