[ERP5 product] PyPDF2 uses asserts which can raise AssertionError in case PDF format is broken.

parent 648d7020
......@@ -329,7 +329,7 @@ class PDFDocument(Image):
self.getRelativeUrl(), info_key, info_value))
else:
result.setdefault(info_key, info_value)
except PdfReadError:
except (PdfReadError, AssertionError):
LOG("PDFDocument.getContentInformation", PROBLEM,
"PyPDF2 is Unable to read PDF, probably corrupted PDF here : %s" % \
(self.getRelativeUrl(),))
......
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