diff options
Diffstat (limited to 'libmat2/pdf.py')
| -rw-r--r-- | libmat2/pdf.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libmat2/pdf.py b/libmat2/pdf.py index 8c3055f..ca94067 100644 --- a/libmat2/pdf.py +++ b/libmat2/pdf.py | |||
| @@ -36,7 +36,10 @@ class PDFParser(abstract.AbstractParser): | |||
| 36 | 36 | ||
| 37 | def remove_all(self) -> bool: | 37 | def remove_all(self) -> bool: |
| 38 | if self.lightweight_cleaning is True: | 38 | if self.lightweight_cleaning is True: |
| 39 | return self.__remove_all_lightweight() | 39 | try: |
| 40 | return self.__remove_all_lightweight() | ||
| 41 | except cairo.Error as e: | ||
| 42 | raise RuntimeError(e) | ||
| 40 | return self.__remove_all_thorough() | 43 | return self.__remove_all_thorough() |
| 41 | 44 | ||
| 42 | def __remove_all_lightweight(self) -> bool: | 45 | def __remove_all_lightweight(self) -> bool: |
