Skip to content

Commit

Permalink
Merge 4f9b2db into 9a449bc
Browse files Browse the repository at this point in the history
  • Loading branch information
wiredfool committed Oct 13, 2014
2 parents 9a449bc + 4f9b2db commit c244703
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions PIL/TiffImagePlugin.py
Expand Up @@ -883,6 +883,10 @@ def _setup(self):
try:
fp = hasattr(self.fp, "fileno") and \
os.dup(self.fp.fileno())
# flush the file descriptor, prevents error on pypy 2.4+
# should also eliminate the need for fp.tell for py3
# in _seek
self.fp.flush()
except IOError:
# io.BytesIO have a fileno, but returns an IOError if
# it doesn't use a file descriptor.
Expand Down

0 comments on commit c244703

Please sign in to comment.