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>
This commit is contained in:
parent
a50b8572f0
commit
fcaeeb7653
1 changed files with 2 additions and 0 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue