Commit e179f336 authored by jvoisin's avatar jvoisin

Improve SVG parsing reliability

parent 615997be
Pipeline #31797 failed with stages
in 2 minutes and 14 seconds
......@@ -26,7 +26,10 @@ class SVGParser(exiftool.ExiftoolParser):
}
def remove_all(self) -> bool:
svg = Rsvg.Handle.new_from_file(self.filename)
try:
svg = Rsvg.Handle.new_from_file(self.filename)
except (GLib.GError, RuntimeError):
raise ValueError
dimensions = svg.get_dimensions()
surface = cairo.SVGSurface(self.output_filename,
dimensions.height,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment