From 84a6ed768476323d3db6fd9087ce35d91bc3dec9 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Mon, 13 Mar 2017 18:17:17 +0100 Subject: [PATCH] If your settings from 1.X are broken with skip them at import Fix #932 --- gns3server/controller/__init__.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/gns3server/controller/__init__.py b/gns3server/controller/__init__.py index da0f6f9c..34f45508 100644 --- a/gns3server/controller/__init__.py +++ b/gns3server/controller/__init__.py @@ -196,14 +196,17 @@ class Controller: data = json.load(f) server_settings = data.get("Servers", {}) for remote in server_settings.get("remote_servers", []): - yield from self.add_compute( - host=remote.get("host", "localhost"), - port=remote.get("port", 3080), - protocol=remote.get("protocol", "http"), - name=remote.get("url"), - user=remote.get("user"), - password=remote.get("password") - ) + try: + yield from self.add_compute( + host=remote.get("host", "localhost"), + port=remote.get("port", 3080), + protocol=remote.get("protocol", "http"), + name=remote.get("url"), + user=remote.get("user"), + password=remote.get("password") + ) + except aiohttp.web.HTTPConflict: + pass # if the server is broken we skip it if "vm" in server_settings: vmname = None vm_settings = server_settings["vm"]