Fix bug with fixed bug in VM Settings

fixes QubesOS/qubes-issues#4866
This commit is contained in:
Marta Marczykowska-Górecka 2019-03-11 22:02:32 +01:00
parent d56cee5023
commit 1c06d241f0
No known key found for this signature in database
GPG Key ID: 9A752C30B26FD04B

View File

@ -855,7 +855,7 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
def update_virt_mode_list(self): def update_virt_mode_list(self):
choices = ['HVM', 'PV'] choices = ['HVM', 'PV']
if self.dev_list: if hasattr(self, "dev_list"):
devs_attached = self.dev_list.selected_list.count() != 0 devs_attached = self.dev_list.selected_list.count() != 0
else: else:
devs_attached = bool(list(self.vm.devices['pci'].persistent())) devs_attached = bool(list(self.vm.devices['pci'].persistent()))