Browse Source

Improve error message for invalid SVG.

tags/v2.6.0
Andrew Belt 7 months ago
parent
commit
9c5e5b3497
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      helper.py

+ 4
- 1
helper.py View File

@@ -237,7 +237,10 @@ def create_module(slug, panel_filename=None, source_filename=None):
return

# Read SVG XML
tree = xml.etree.ElementTree.parse(panel_filename)
try:
tree = xml.etree.ElementTree.parse(panel_filename)
except:
raise UserException("Invalid SVG")

components = panel_to_components(tree)



Loading…
Cancel
Save