Permalink
Browse files

Moved strerr redirection to be first call in PdfFileReader constructor

  • Loading branch information...
1 parent b2458da commit 9adc508201d3ce9fc51cb786c4f4c56221fd71c1 @knowah knowah committed May 18, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 PyPDF2/pdf.py
View
2 PyPDF2/pdf.py
@@ -542,14 +542,14 @@ def addNamedDestination(self, title, pagenum):
# sys.stderr
class PdfFileReader(object):
def __init__(self, stream, strict=True, errout=sys.stderr):
+ sys.stderr = errout
self.strict = strict
self.flattenedPages = None
self.resolvedObjects = {}
self.xrefIndex = 0
self.read(stream)
self.stream = stream
self._override_encryption = False
- sys.stderr = errout
##
# Retrieves the PDF file's document information dictionary, if it exists.
# Note that some PDF files use metadata streams instead of docinfo

0 comments on commit 9adc508

Please sign in to comment.