1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-01 04:38:12 +00:00

If your settings from 1.X are broken with skip them at import

Fix #932
This commit is contained in:
Julien Duponchelle 2017-03-13 18:17:17 +01:00
parent 1d5029e4e2
commit 84a6ed7684
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -196,6 +196,7 @@ class Controller:
data = json.load(f) data = json.load(f)
server_settings = data.get("Servers", {}) server_settings = data.get("Servers", {})
for remote in server_settings.get("remote_servers", []): for remote in server_settings.get("remote_servers", []):
try:
yield from self.add_compute( yield from self.add_compute(
host=remote.get("host", "localhost"), host=remote.get("host", "localhost"),
port=remote.get("port", 3080), port=remote.get("port", 3080),
@ -204,6 +205,8 @@ class Controller:
user=remote.get("user"), user=remote.get("user"),
password=remote.get("password") password=remote.get("password")
) )
except aiohttp.web.HTTPConflict:
pass # if the server is broken we skip it
if "vm" in server_settings: if "vm" in server_settings:
vmname = None vmname = None
vm_settings = server_settings["vm"] vm_settings = server_settings["vm"]