Skip to content

Commit

Permalink
Do not close exclusive fp after loading
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Jun 12, 2019
1 parent a986fed commit 72d5ee3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Tests/test_file_psd.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ def test_seek_eoferror(self):

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)
Expand Down
1 change: 1 addition & 0 deletions src/PIL/PsdImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class PsdImageFile(ImageFile.ImageFile):

format = "PSD"
format_description = "Adobe Photoshop"
_close_exclusive_fp_after_loading = False

def _open(self):

Expand Down

0 comments on commit 72d5ee3

Please sign in to comment.