From ea825f01900861e88bdd345c8ffe84d5d584a638 Mon Sep 17 00:00:00 2001 From: retoor Date: Sun, 1 Dec 2024 06:18:19 +0100 Subject: [PATCH] Replace replace with ignore. --- src/zhurnal/app.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/zhurnal/app.py b/src/zhurnal/app.py index 06de351..9504d2d 100644 --- a/src/zhurnal/app.py +++ b/src/zhurnal/app.py @@ -253,7 +253,7 @@ class Zhurnal(web.Application): time_elapsed = round( time_previous and time_current - time_previous or 0, 4 ) - decoded_line = line.decode("utf-8", "replace").strip() + decoded_line = line.decode("utf-8", "ignore").strip() print(decoded_line) decoded_line = "".join(c for c in decoded_line if c.isprintable()) for client in app.clients: @@ -292,7 +292,6 @@ class Zhurnal(web.Application): ) async def start_processes(self, app): - print(app) for x, command in enumerate(self.commands): self.processes[command] = asyncio.create_task( self.run_process("process-{}".format(x), command)