diff options
| author | John Snow <jsnow@redhat.com> | 2022-07-22 14:13:45 -0400 |
|---|---|---|
| committer | John Snow <jsnow@redhat.com> | 2025-09-15 14:36:01 -0400 |
| commit | fcaeeb7653d2c6f38183170e1cae5729adb7875c (patch) | |
| tree | 4d72efdcb13178eaa04710678dc62a07663946c6 /python | |
| parent | a50b8572f0e3873db64dd6660cea047f067ca5f7 (diff) | |
| download | focaccia-qemu-fcaeeb7653d2c6f38183170e1cae5729adb7875c.tar.gz focaccia-qemu-fcaeeb7653d2c6f38183170e1cae5729adb7875c.zip | |
python: backport 'qmp-shell-wrap: handle missing binary gracefully'
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>
Diffstat (limited to 'python')
| -rw-r--r-- | python/qemu/qmp/qmp_shell.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/python/qemu/qmp/qmp_shell.py b/python/qemu/qmp/qmp_shell.py index 02028e94b5..c923ff09e1 100644 --- a/python/qemu/qmp/qmp_shell.py +++ b/python/qemu/qmp/qmp_shell.py @@ -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) |