1
0
mirror of https://github.com/GNS3/gns3-server synced 2025-01-11 08:30:57 +00:00

Raise clean error when node timeout when stopped

This commit is contained in:
Julien Duponchelle 2016-11-04 11:40:55 +01:00
parent dc26be43c2
commit 5dee4eb052
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -398,9 +398,11 @@ class Node:
"""
try:
yield from self.post("/stop")
# We don't care if a compute is down at this step
# We don't care if a node is down at this step
except (aiohttp.errors.ClientOSError, aiohttp.errors.ClientHttpProcessingError, aiohttp.web.HTTPError):
pass
except asyncio.TimeoutError:
raise aiohttp.web.HTTPRequestTimeout(text="Timeout when stopping {}".format(self._name))
@asyncio.coroutine
def suspend(self):