From 50994dcfe4b97667c27c55f5158579490bc714ac Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Sat, 9 Dec 2023 12:51:46 +0100 Subject: [PATCH] Relax qemu check in uncaught_exception_handler() qemu binaries can have many different names (qemu, qemu-kvm, qemu-system-xxx, ...) so let's not log a stacktrace for any binary that starts with "qemu". --- mkosi/run.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mkosi/run.py b/mkosi/run.py index 6ee9f0304..19f714b8b 100644 --- a/mkosi/run.py +++ b/mkosi/run.py @@ -182,7 +182,12 @@ def uncaught_exception_handler(exit: Callable[[int], NoReturn]) -> Iterator[None # Failures from qemu, ssh and systemd-nspawn are expected and we won't log stacktraces for those. # Failures from self come from the forks we spawn to build images in a user namespace. We've already done all # the logging for those failures so we don't log stacktraces for those either. - if ARG_DEBUG.get() and e.cmd and e.cmd[0] not in ("self", "qemu", "ssh", "systemd-nspawn"): + if ( + ARG_DEBUG.get() and + e.cmd and + e.cmd[0] not in ("self", "ssh", "systemd-nspawn") and + not e.cmd[0].startswith("qemu") + ): sys.excepthook(*ensure_exc_info()) # We always log when subprocess.CalledProcessError is raised, so we don't log again here. -- 2.47.2