Fix very unlikely case when user right clicks the VM in the exact moment he

deletes it.
This commit is contained in:
donoban 2018-05-31 00:47:38 +02:00
parent cb5bc16948
commit b8cb0f625b
No known key found for this signature in database
GPG Key ID: 141310D8E3ED08A5

View File

@ -1219,6 +1219,7 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow):
@QtCore.pyqtSlot('const QPoint&') @QtCore.pyqtSlot('const QPoint&')
def open_context_menu(self, point): def open_context_menu(self, point):
try:
vm = self.get_selected_vm() vm = self.get_selected_vm()
# logs menu # logs menu
@ -1244,6 +1245,8 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow):
self.logs_menu.setEnabled(not menu_empty) self.logs_menu.setEnabled(not menu_empty)
self.context_menu.exec_(self.table.mapToGlobal(point)) self.context_menu.exec_(self.table.mapToGlobal(point))
except exc.QubesPropertyAccessError:
pass
@QtCore.pyqtSlot('QAction *') @QtCore.pyqtSlot('QAction *')
def show_log(self, action): def show_log(self, action):