mirror of
https://github.com/GNS3/gns3-server
synced 2025-01-11 16:41:04 +00:00
parent
490576fedc
commit
7c318d477d
@ -99,8 +99,8 @@ def get_size(data, default_width=0, default_height=0):
|
|||||||
root = tree.getroot()
|
root = tree.getroot()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
width = _svg_convert_size(root.attrib["width"])
|
width = _svg_convert_size(root.attrib.get("width", 0))
|
||||||
height = _svg_convert_size(root.attrib["height"])
|
height = _svg_convert_size(root.attrib.get("height", 0))
|
||||||
except IndexError:
|
except IndexError:
|
||||||
raise ValueError("Invalid SVG file")
|
raise ValueError("Invalid SVG file")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user