Fix main()

This commit is contained in:
donoban 2021-04-10 18:54:28 +02:00
parent f1f80556dc
commit be39ec86f9
No known key found for this signature in database
GPG Key ID: 141310D8E3ED08A5
2 changed files with 5 additions and 2 deletions

View File

@ -24,6 +24,7 @@ from . import ui_bootfromdevice # pylint: disable=no-name-in-module
from PyQt5 import QtWidgets, QtGui # pylint: disable=import-error
from qubesadmin import tools
from qubesadmin import exc
from qubesadmin.tools import qvm_start
class VMBootFromDeviceWindow(ui_bootfromdevice.Ui_BootDialog,
@ -168,8 +169,8 @@ def main(args=None):
args = parser.parse_args(args)
vm = args.domains.pop()
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 __name__ == "__main__":
main()

View File

@ -564,3 +564,5 @@ def run_synchronous(window_class):
qt_app.exec_()
qt_app.exit()
return window