From b79235afb7e8fee29770cfe019d2c74a4cbe23b4 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Thu, 15 Dec 2016 16:52:01 +0100 Subject: [PATCH] Fix KeyError: 'color' when converting some 1.3 topologies Fix #837 --- gns3server/controller/topology.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gns3server/controller/topology.py b/gns3server/controller/topology.py index c8eb0955..bb5c1987 100644 --- a/gns3server/controller/topology.py +++ b/gns3server/controller/topology.py @@ -370,7 +370,7 @@ def _convert_1_3_later(topo, topo_path): height=int(font_info[1]) * 2, width=int(font_info[1]) * len(note["text"]), fill="#" + note["color"][-6:], - opacity=round(1.0 / 255 * int(note["color"][:3][-2:], base=16), 2), # Extract the alpha channel from the hexa version + opacity=round(1.0 / 255 * int(note.get("color", "#ffffffff")[:3][-2:], base=16), 2), # Extract the alpha channel from the hexa version family=font_info[0], size=int(font_info[1]), weight=weight,