Check for qubes-windows-tools presence before starting installation

Prevents confusing error message.

Fixes QubesOS/qubes-issues#1977
This commit is contained in:
Marek Marczykowski-Górecki 2016-06-21 02:07:22 +02:00
parent 49c209d077
commit 4e5b990f02
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -1169,6 +1169,16 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
vm = self.get_selected_vm()
assert not vm.is_running()
windows_tools_installed = \
os.path.exists('/usr/lib/qubes/qubes-windows-tools.iso')
if not windows_tools_installed:
msg = QMessageBox()
msg.warning(self, "Error starting VM!",
"You need to install 'qubes-windows-tools' "
"package to use this option")
return
thread_monitor = ThreadMonitor()
thread = threading.Thread(target=self.do_start_vm_tools_install,
args=(vm, thread_monitor))