From c14d79a3d530b80ba94706e886af817862c00ff8 Mon Sep 17 00:00:00 2001 From: grossmj Date: Mon, 21 Jan 2019 16:24:23 +0700 Subject: [PATCH] Fix indentation issue. Ref https://github.com/GNS3/gns3-gui/issues/2674 --- gns3server/utils/picture.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gns3server/utils/picture.py b/gns3server/utils/picture.py index 650bc6ba..3e9fd416 100644 --- a/gns3server/utils/picture.py +++ b/gns3server/utils/picture.py @@ -112,14 +112,14 @@ def get_size(data, default_width=0, default_height=0): if not viewbox: raise ValueError("Invalid SVG file: missing viewBox attribute") _, _, viewbox_width, viewbox_height = re.split(r'[\s,]+', viewbox) - if width_attr.endswith("%"): - width = _svg_convert_size(viewbox_width, width_attr) - else: - width = _svg_convert_size(width_attr) - if height_attr.endswith("%"): - height = _svg_convert_size(viewbox_height, height_attr) - else: - height = _svg_convert_size(height_attr) + if width_attr.endswith("%"): + width = _svg_convert_size(viewbox_width, width_attr) + else: + width = _svg_convert_size(width_attr) + if height_attr.endswith("%"): + height = _svg_convert_size(viewbox_height, height_attr) + else: + height = _svg_convert_size(height_attr) except (AttributeError, IndexError) as e: raise ValueError("Invalid SVG file: {}".format(e))