Added try/except for change_network

This commit is contained in:
donoban 2020-11-13 23:35:14 +01:00
parent ed98a1ea6e
commit 95c74714d7
No known key found for this signature in database
GPG Key ID: 141310D8E3ED08A5

View File

@ -651,8 +651,14 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow):
info.vm.template = template
def change_network(self, netvm):
try:
for info in self.get_selected_vms():
info.vm.netvm = netvm
except exc.QubesValueError as ex:
QMessageBox.warning(
self,
self.tr("Change Network Error"),
self.tr((str(ex))))
def __init__(self, qt_app, qubes_app, dispatcher, _parent=None):
super().__init__()