From 8d22f2930ec6c4a0850ef90c5b095d803af62691 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Mon, 27 Mar 2017 10:41:28 +0200 Subject: [PATCH] Fix a crash with missing size in the svg files Fix #960 --- gns3server/utils/picture.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gns3server/utils/picture.py b/gns3server/utils/picture.py index dad421e0..50d17996 100644 --- a/gns3server/utils/picture.py +++ b/gns3server/utils/picture.py @@ -99,8 +99,8 @@ def get_size(data, default_width=0, default_height=0): root = tree.getroot() try: - width = _svg_convert_size(root.attrib.get("width", 0)) - height = _svg_convert_size(root.attrib.get("height", 0)) + width = _svg_convert_size(root.attrib.get("width", "0")) + height = _svg_convert_size(root.attrib.get("height", "0")) except IndexError: raise ValueError("Invalid SVG file")