]> 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)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 16 Sep 2025 20:35:35 +0000 (23:35 +0300)
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>
(cherry picked from commit fcaeeb7653d2c6f38183170e1cae5729adb7875c)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
python/qemu/qmp/qmp_shell.py

index 98e684e9e8a641ff06775f440111ea33e0a8209e..1ba0e72407857ea010c34d72df583a7c6dd38279 100644 (file)
@@ -610,6 +610,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)