Catch some broken hostname for compute node

Fix #961
This commit is contained in:
Julien Duponchelle 2017-03-28 12:14:27 +02:00
parent 2564740665
commit 815820f692
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -504,7 +504,7 @@ class Compute:
response = yield from self._session().request(method, url, headers=headers, data=data, auth=self._auth, chunked=chunked, timeout=timeout) response = yield from self._session().request(method, url, headers=headers, data=data, auth=self._auth, chunked=chunked, timeout=timeout)
except asyncio.TimeoutError as e: except asyncio.TimeoutError as e:
raise ComputeError("Timeout error when connecting to {}".format(url)) raise ComputeError("Timeout error when connecting to {}".format(url))
except (aiohttp.errors.ClientOSError, aiohttp.errors.ClientRequestError, aiohttp.errors.ServerDisconnectedError, aiohttp.ClientResponseError) as e: except (aiohttp.errors.ClientOSError, aiohttp.errors.ClientRequestError, aiohttp.errors.ServerDisconnectedError, aiohttp.ClientResponseError, ValueError) as e:
raise ComputeError(str(e)) raise ComputeError(str(e))
body = yield from response.read() body = yield from response.read()
if body and not raw: if body and not raw: