Replace direct xl calls with proper QubesVM methods
这个提交包含在:
父节点
e0a15c12d4
当前提交
47669aac4e
@ -1394,7 +1394,7 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
|
||||
|
||||
if vm.is_paused():
|
||||
try:
|
||||
subprocess.check_call (["/usr/sbin/xl", "unpause", vm.name])
|
||||
vm.unpause()
|
||||
except Exception as ex:
|
||||
QMessageBox.warning (None, "Error unpausing VM!", "ERROR: {0}".format(ex))
|
||||
return
|
||||
@ -1432,8 +1432,7 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
|
||||
vm = self.get_selected_vm()
|
||||
assert vm.is_running()
|
||||
try:
|
||||
subprocess.check_call (["/usr/sbin/xl", "pause", vm.name])
|
||||
|
||||
vm.pause()
|
||||
except Exception as ex:
|
||||
QMessageBox.warning (None, "Error pausing VM!", "ERROR: {0}".format(ex))
|
||||
return
|
||||
@ -1458,7 +1457,7 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
|
||||
|
||||
def shutdown_vm(self, vm, shutdown_time = vm_shutdown_timeout):
|
||||
try:
|
||||
subprocess.check_call (["/usr/sbin/xl", "shutdown", vm.name])
|
||||
vm.shutdown()
|
||||
except Exception as ex:
|
||||
QMessageBox.warning (None, "Error shutting down VM!", "ERROR: {0}".format(ex))
|
||||
return
|
||||
|
||||
正在加载...
在新工单中引用
屏蔽一个用户