1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-18 22:38:07 +00:00

Fix a crash when docker is not available

This commit is contained in:
Julien Duponchelle 2016-01-11 19:11:25 +01:00
parent 758fb2a0e7
commit f92ac6e52e

View File

@ -49,8 +49,8 @@ class Docker(BaseManager):
if not self._connected:
try:
self._connector = aiohttp.connector.UnixConnector(self._server_url)
self._connected = True
yield from self.query("GET", "info")
self._connected = True
except (aiohttp.errors.ClientOSError, FileNotFoundError):
self._connected = False
raise DockerError("Can't connect to docker daemon")