From 9ce126b0bad3a4efb15f307ab565438ce2c7f78e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 13 Dec 2024 05:59:45 +0100 Subject: [PATCH] Strip more color sequences from qubes-dom0-update output DNF5 likes to add more colors... QubesOS/qubes-issues#9244 --- _modules/qubes_dom0_update.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/_modules/qubes_dom0_update.py b/_modules/qubes_dom0_update.py index ab4e394..fbe5473 100644 --- a/_modules/qubes_dom0_update.py +++ b/_modules/qubes_dom0_update.py @@ -189,6 +189,10 @@ def _sanitize_output(output): # drop coloring sequences added by qubes-dom0-update (if any) if output.startswith("\033[0;"): output = output[7:] + if output.startswith("\033[1m"): + output = output[4:] + if output.startswith("\033[34m"): + output = output[5:] if output.endswith("\033[0m"): output = output[:-4] output = output[:3000] # arbitrary limit