Fix a crash when docker is not available

This commit is contained in:
Julien Duponchelle committed 2016-01-11 19:11:25 +01:00
1 parent 758fb2a0e7
commit f92ac6e52e
1 file changed
+1 -1
+1 -1
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")