Fix possible 'None' default error

This commit is contained in:
donoban 2021-01-10 23:39:33 +01:00
parent 9f44f7413d
commit a02aeb4c25
No known key found for this signature in database
GPG Key ID: 141310D8E3ED08A5

View File

@ -954,7 +954,7 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow):
return vm.property_get_default('netvm') return vm.property_get_default('netvm')
def init_network_menu(self): def init_network_menu(self):
default = self._get_default_netvm().name default = self._get_default_netvm()
self.network_menu.clear() self.network_menu.clear()
action = self.network_menu.addAction("None") action = self.network_menu.addAction("None")
action.triggered.connect(partial(self.change_network, None)) action.triggered.connect(partial(self.change_network, None))