1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-24 17:28:08 +00:00

Catch exception if we can't change process priority on Windows

Fix #380
This commit is contained in:
Julien Duponchelle 2016-01-03 21:23:35 +01:00
parent 061a6e3b25
commit 137cf59e97

View File

@ -773,7 +773,10 @@ class QemuVM(BaseVM):
priority = win32process.IDLE_PRIORITY_CLASS priority = win32process.IDLE_PRIORITY_CLASS
else: else:
priority = win32process.NORMAL_PRIORITY_CLASS priority = win32process.NORMAL_PRIORITY_CLASS
try:
win32process.SetPriorityClass(handle, priority) win32process.SetPriorityClass(handle, priority)
except win32process.error as e:
log.error('Could not change process priority for QEMU VM "{}": {}'.format(self._name, e))
else: else:
if self._process_priority == "realtime": if self._process_priority == "realtime":
priority = -20 priority = -20