fix in papercraft_unfold

This commit is contained in:
leyghisbb 2021-04-30 14:22:57 +02:00
parent 8da67341bd
commit 6f9c2a9ab1

View File

@ -180,8 +180,14 @@ class Unfold(inkex.EffectExtension):
inkex.utils.debug("There was no SVG output generated. Cannot continue")
exit(1)
p = etree.XMLParser(huge_tree=True)
try:
doc = etree.parse(stream, parser=etree.XMLParser(huge_tree=True)).getroot()
except BaseException as e:
self.msg("Error: STL could not be unfolded")
exit(1)
finally:
stream.close()
doc.set('id', self.svg.get_unique_id('papercraft_unfold'))
self.document.getroot().append(doc)