Skip to content

Conversation

@radarhere
Copy link
Member

if self._exclusive_fp:
self.fp.close()
self.fp = None

is a copy of

Pillow/src/PIL/ImageFile.py

Lines 265 to 272 in 2ebb3e9

def verify(self) -> None:
"""Check file integrity"""
# raise exception if something's wrong. must be called
# directly after open, and closes file when finished.
if self._exclusive_fp:
self.fp.close()
self.fp = None

so let's just call super().verify()

@radarhere radarhere added Cleanup and removed Cleanup labels Dec 28, 2025
@hugovk hugovk merged commit 19910ed into python-pillow:main Dec 31, 2025
56 checks passed
@radarhere radarhere deleted the verify branch December 31, 2025 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants