mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-15 02:32:29 +03:00
close the fd, if possible. Fixes #526
This commit is contained in:
parent
b73b4a7b63
commit
9552d9bc66
|
@ -729,6 +729,9 @@ class TiffImageFile(ImageFile.ImageFile):
|
||||||
|
|
||||||
self.tile = []
|
self.tile = []
|
||||||
self.readonly = 0
|
self.readonly = 0
|
||||||
|
# libtiff closed the fp in a, we need to close self.fp, if possible
|
||||||
|
if hasattr(self.fp, 'close'):
|
||||||
|
self.fp.close()
|
||||||
self.fp = None # might be shared
|
self.fp = None # might be shared
|
||||||
|
|
||||||
if e < 0:
|
if e < 0:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user