Do not close exclusive fp after loading

This commit is contained in:
Andrew Murray 2019-03-31 22:24:10 +11:00
parent a986fed5b4
commit 72d5ee3bfa
2 changed files with 7 additions and 0 deletions

View File

@ -65,6 +65,12 @@ class TestImagePsd(PillowTestCase):
self.assertRaises(EOFError, im.seek, -1)
def test_open_after_exclusive_load(self):
im = Image.open(test_file)
im.load()
im.seek(im.tell()+1)
im.load()
def test_icc_profile(self):
im = Image.open(test_file)
self.assertIn("icc_profile", im.info)

View File

@ -54,6 +54,7 @@ class PsdImageFile(ImageFile.ImageFile):
format = "PSD"
format_description = "Adobe Photoshop"
_close_exclusive_fp_after_loading = False
def _open(self):