Catch error when you try to put an invalid server url

Fix #929
This commit is contained in:
Julien Duponchelle committed 2017-03-13 16:59:42 +01:00
1 parent 0dc38a3970
commit 886329a978
1 file changed
+2
+2
View File
@@ -397,6 +397,8 @@ class Compute:
raise aiohttp.web.HTTPConflict(text="Invalid auth for server {}".format(self._id))
except aiohttp.web.HTTPServiceUnavailable:
raise aiohttp.web.HTTPConflict(text="The server {} is unavailable".format(self._id))
except ValueError:
raise aiohttp.web.HTTPConflict(text="Invalid server url for server {}".format(self._id))
if "version" not in response.json:
self._http_session.close()