[elbe-devel] [PATCH] elbepack: log: strip additional ansi escapes used by screen
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Wed May 8 15:41:47 CEST 2024
Screen emits these escape sequences.
This breaks the build when elbe itself is called during finetuning.
This code is brittle already as only a limited set of escape characters
are filtered.
This will need a better detection, but it seems there is no proper
libraru available to do so.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh 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 5b0d0493f1f9..5fc1eeab1917 100644
--- a/elbepack/log.py
+++ b/elbepack/log.py
@@ -272,7 +272,7 @@ class AsyncLogging(threading.Thread):
logbuf = '\n'.join(self.lines[-cnt:])
# filter out ansi sequences.
- logbuf = re.sub('\u001b[.*?[@-~]', '', logbuf)
+ logbuf = re.sub('\u001b[.*?[@-~(=]', '', logbuf)
logbuf = re.sub('\u0008', '', logbuf)
self.stream.info(logbuf)
---
base-commit: c4d2d11ef1f913688c9a97fbfe48d09a584adb21
change-id: 20240508-log-sanitize-ansi-escapes-36db173f0db4
Best regards,
--
Thomas Weißschuh <thomas.weissschuh at linutronix.de>
More information about the elbe-devel
mailing list