1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-29 02:08:10 +00:00

Catch error when you try to put an invalid server url

Fix #929
This commit is contained in:
Julien Duponchelle 2017-03-13 16:59:42 +01:00
parent 0dc38a3970
commit 886329a978
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

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