From 5558127b6f6a1d30f069abac57c97fcbc2b4acb7 Mon Sep 17 00:00:00 2001 From: donoban Date: Sat, 10 Apr 2021 19:16:12 +0200 Subject: [PATCH] Add check before launch qvm_start() --- qubesmanager/bootfromdevice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qubesmanager/bootfromdevice.py b/qubesmanager/bootfromdevice.py index 28830dc..ddd939e 100644 --- a/qubesmanager/bootfromdevice.py +++ b/qubesmanager/bootfromdevice.py @@ -170,7 +170,8 @@ def main(args=None): vm = args.domains.pop() window = utils.run_synchronous(functools.partial(VMBootFromDeviceWindow, vm)) - qvm_start.main(['--cdrom', window.cdrom_location, vm.name]) + if window.result() == 1 and window.cdrom_location is not None: + qvm_start.main(['--cdrom', window.cdrom_location, vm.name]) if __name__ == "__main__": main()