Skip to content
Snippets Groups Projects
Commit 1aed4ff2 authored by Julien (jvoisin) Voisin's avatar Julien (jvoisin) Voisin
Browse files

Catch a MemoryError in cairo

This should close #202
parent 75c0a750
No related branches found
No related tags found
No related merge requests found
......@@ -38,7 +38,7 @@ class PDFParser(abstract.AbstractParser):
if self.lightweight_cleaning is True:
try:
return self.__remove_all_lightweight()
except cairo.Error as e:
except (cairo.Error, MemoryError) as e:
raise RuntimeError(e)
return self.__remove_all_thorough()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment