Catch error when you try to put an invalid server url

Fix #929
pull/935/head
Julien Duponchelle 7 years ago
parent 0dc38a3970
commit 886329a978
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

@ -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()

Loading…
Cancel
Save