1
0
mirror of https://github.com/GNS3/gns3-server synced 2025-01-23 14:31:03 +00:00

Fix crash if we call stop on dynamips on non started process

Fix #111
This commit is contained in:
Julien Duponchelle 2015-03-27 10:08:03 +01:00
parent be199b77a5
commit 533ce78b90

View File

@ -136,8 +136,9 @@ class DynamipsHypervisor:
except DynamipsError:
pass
try:
yield from self._writer.drain()
self._writer.close()
if self._writer is not None:
yield from self._writer.drain()
self._writer.close()
except OSError as e:
log.debug("Stopping hypervisor {}:{} {}".format(self._host, self._port, e))
self._reader = self._writer = None