Assert fp is not None

This commit is contained in:
Andrew Murray 2025-01-13 07:57:50 +11:00
parent 34762ded75
commit a922126ed7

View File

@ -180,6 +180,7 @@ class ImageFile(Image.Image):
ifds.append((ifd1, exif._info.next)) ifds.append((ifd1, exif._info.next))
offset = None offset = None
assert self.fp is not None
for ifd, ifd_offset in ifds: for ifd, ifd_offset in ifds:
current_offset = self.fp.tell() current_offset = self.fp.tell()
if offset is None: if offset is None: