1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-24 09:18:08 +00:00

Catch auth errors when adding a compute

Fix #813
This commit is contained in:
Julien Duponchelle 2016-12-12 11:27:18 +01:00
parent 897a94f343
commit e2fd339f35
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -370,6 +370,8 @@ class Compute:
return
except aiohttp.web.HTTPNotFound:
raise aiohttp.web.HTTPConflict(text="The server {} is not a GNS3 server or it's a 1.X server".format(self._id))
except aiohttp.web.HTTPUnauthorized:
raise aiohttp.web.HTTPConflict(text="Invalid auth for server {} ".format(self._id))
if "version" not in response.json:
self._http_session.close()