From 839696f6f9e3250ff893ffeda98d3a4dd1281df0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marta=20Marczykowska-G=C3=B3recka?= Date: Mon, 8 Jan 2018 20:00:55 +0100 Subject: [PATCH] Fixed missing import Fixed missing import in boot-from-cdrom tool. fixes QubesOS/qubes-issues#3421 --- qubesmanager/bootfromdevice.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qubesmanager/bootfromdevice.py b/qubesmanager/bootfromdevice.py index ab54b98..839104a 100644 --- a/qubesmanager/bootfromdevice.py +++ b/qubesmanager/bootfromdevice.py @@ -23,6 +23,7 @@ from . import utils from . import ui_bootfromdevice # pylint: disable=no-name-in-module from PyQt4 import QtGui, QtCore # pylint: disable=import-error from qubesadmin import tools +from qubesadmin.tools import qvm_start class VMBootFromDeviceWindow(ui_bootfromdevice.Ui_BootDialog, QtGui.QDialog): @@ -45,7 +46,6 @@ class VMBootFromDeviceWindow(ui_bootfromdevice.Ui_BootDialog, QtGui.QDialog): # populate buttons and such self.__init_buttons__() - def reject(self): self.done(0) @@ -62,7 +62,7 @@ class VMBootFromDeviceWindow(ui_bootfromdevice.Ui_BootDialog, QtGui.QDialog): self.tr("ERROR!"), self.tr("No file or block device selected; please select one.")) return - tools.qvm_start.main(['--cdrom', cdrom_location, self.vm.name]) + qvm_start.main(['--cdrom', cdrom_location, self.vm.name]) def __init_buttons__(self): self.fileVM.setEnabled(False) @@ -112,6 +112,7 @@ class VMBootFromDeviceWindow(ui_bootfromdevice.Ui_BootDialog, QtGui.QDialog): parser = tools.QubesArgumentParser(vmname_nargs=1) + def main(args=None): args = parser.parse_args(args) vm = args.domains.pop()