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".
# 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.