]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
python: backport 'qmp-shell-wrap: handle missing binary gracefully'
authorJohn Snow <jsnow@redhat.com>
Fri, 22 Jul 2022 18:13:45 +0000 (14:13 -0400)
committerJohn Snow <jsnow@redhat.com>
Mon, 15 Sep 2025 18:36:01 +0000 (14:36 -0400)
Signed-off-by: John Snow <jsnow@redhat.com>
cherry picked from commit python-qemu-qmp@9c889dcbd58817b0c917a9d2dd16161f48ac8203
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
python/qemu/qmp/qmp_shell.py

index 02028e94b5a26db0b6af03e1ff859a53a399b7e4..c923ff09e1f4db61da30af873335e5b3c5ddfad5 100644 (file)
@@ -607,6 +607,8 @@ def main_wrap() -> None:
 
                 for _ in qemu.repl():
                     pass
+    except FileNotFoundError:
+        sys.stderr.write(f"ERROR: QEMU executable '{cmd[0]}' not found.\n")
     finally:
         os.unlink(sockpath)