From 490576fedc4055024d81fe8f4d708fc17909c623 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Thu, 16 Mar 2017 18:29:02 +0100 Subject: [PATCH] Try to fix some 1.3 topology with corrupted data Fix #945 --- gns3server/controller/topology.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gns3server/controller/topology.py b/gns3server/controller/topology.py index 7213afb7..79d57d7f 100644 --- a/gns3server/controller/topology.py +++ b/gns3server/controller/topology.py @@ -253,7 +253,10 @@ def _convert_1_3_later(topo, topo_path): for old_node in topo.get("nodes", []): node = {} node["console"] = old_node["properties"].get("console", None) - node["compute_id"] = server_id_to_compute_id[old_node["server_id"]] + try: + node["compute_id"] = server_id_to_compute_id[old_node["server_id"]] + except KeyError: + node["compute_id"] = "local" node["console_type"] = old_node["properties"].get("console_type", "telnet") node["name"] = old_node["label"]["text"] node["label"] = _convert_label(old_node["label"])