Commit c80c1af9 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

ignore exception in PDFDocument.getContentInformation when the document is encrypted.

parent 27cac517
...@@ -333,6 +333,10 @@ class PDFDocument(Image): ...@@ -333,6 +333,10 @@ class PDFDocument(Image):
LOG("PDFDocument.getContentInformation", PROBLEM, LOG("PDFDocument.getContentInformation", PROBLEM,
"PyPDF2 is Unable to read PDF, probably corrupted PDF here : %s" % \ "PyPDF2 is Unable to read PDF, probably corrupted PDF here : %s" % \
(self.getRelativeUrl(),)) (self.getRelativeUrl(),))
except Exception:
# an exception of Exception class will be raised when the
# document is encrypted.
pass
finally: finally:
tmp.close() tmp.close()
......
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