mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Catch exception when a process cannot be killed. Fixes #296.
This commit is contained in:
1 parent
eb5f9c48f2
commit
fda33c56de
3 files changed
+14
-5
No files matched your search
@@ -140,7 +140,12 @@ class Hypervisor(DynamipsHypervisor):
|
||||
except asyncio.TimeoutError:
|
||||
if self._process.returncode is None:
|
||||
log.warn("Dynamips process {} is still running... killing it".format(self._process.pid))
|
||||
self._process.kill()
|
||||
try:
|
||||
self._process.kill()
|
||||
except OSError as e:
|
||||
log.error("Cannot stop the Dynamips process: {}".format(e))
|
||||
if self._process.returncode is None:
|
||||
log.warn('Dynamips hypervisor with PID={} is still running'.format(self._process.pid))
|
||||
|
||||
if self._stdout_file and os.access(self._stdout_file, os.W_OK):
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user