From 541fee0c3c495ff20cd771c12a71370d1062296b Mon Sep 17 00:00:00 2001 From: Mateusz Patyk Date: Mon, 15 Jul 2024 20:17:41 +0200 Subject: [PATCH] mtest: remove superfluous '\r' from read_decode() On Windows, the output read from the stream has '\r\n', which in .txt, .json and console logger (when captured to a file) translates to '\n\n'. This results in every log line being separated by an empty line. --- mesonbuild/mtest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py index a2a6067fa..9975afa22 100644 --- a/mesonbuild/mtest.py +++ b/mesonbuild/mtest.py @@ -1194,7 +1194,7 @@ async def read_decode(reader: asyncio.StreamReader, except asyncio.LimitOverrunError as e: line_bytes = await reader.readexactly(e.consumed) if line_bytes: - line = decode(line_bytes) + line = decode(line_bytes).replace('\r\n', '\n') stdo_lines.append(line) if console_mode is ConsoleUser.STDOUT: print(line, end='', flush=True)