diff options
Diffstat (limited to 'libmat2/images.py')
| -rw-r--r-- | libmat2/images.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libmat2/images.py b/libmat2/images.py index e55b765..c584c1c 100644 --- a/libmat2/images.py +++ b/libmat2/images.py | |||
| @@ -26,7 +26,10 @@ class SVGParser(exiftool.ExiftoolParser): | |||
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | def remove_all(self) -> bool: | 28 | def remove_all(self) -> bool: |
| 29 | svg = Rsvg.Handle.new_from_file(self.filename) | 29 | try: |
| 30 | svg = Rsvg.Handle.new_from_file(self.filename) | ||
| 31 | except GLib.GError: | ||
| 32 | raise ValueError | ||
| 30 | dimensions = svg.get_dimensions() | 33 | dimensions = svg.get_dimensions() |
| 31 | surface = cairo.SVGSurface(self.output_filename, | 34 | surface = cairo.SVGSurface(self.output_filename, |
| 32 | dimensions.height, | 35 | dimensions.height, |
