Add check before launch qvm_start()

This commit is contained in:
donoban 2021-04-10 19:16:12 +02:00
parent be39ec86f9
commit 5558127b6f
No known key found for this signature in database
GPG Key ID: 141310D8E3ED08A5

View File

@ -170,7 +170,8 @@ def main(args=None):
vm = args.domains.pop() vm = args.domains.pop()
window = utils.run_synchronous(functools.partial(VMBootFromDeviceWindow, vm)) 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__": if __name__ == "__main__":
main() main()