1
0
mirror of synced 2024-11-21 16:54:23 +01:00

Catch a MemoryError in cairo

This should close #202
This commit is contained in:
jvoisin 2024-09-11 15:51:21 +02:00
parent 75c0a750c1
commit 1aed4ff2a5

View File

@ -38,7 +38,7 @@ class PDFParser(abstract.AbstractParser):
if self.lightweight_cleaning is True: if self.lightweight_cleaning is True:
try: try:
return self.__remove_all_lightweight() return self.__remove_all_lightweight()
except cairo.Error as e: except (cairo.Error, MemoryError) as e:
raise RuntimeError(e) raise RuntimeError(e)
return self.__remove_all_thorough() return self.__remove_all_thorough()