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,6 +136,7 @@ class DynamipsHypervisor:
except DynamipsError: except DynamipsError:
pass pass
try: try:
if self._writer is not None:
yield from self._writer.drain() yield from self._writer.drain()
self._writer.close() self._writer.close()
except OSError as e: except OSError as e: