diff --git a/PIL/SpiderImagePlugin.py b/PIL/SpiderImagePlugin.py index d5457893c..a59329497 100644 --- a/PIL/SpiderImagePlugin.py +++ b/PIL/SpiderImagePlugin.py @@ -173,7 +173,7 @@ class SpiderImageFile(ImageFile.ImageFile): def seek(self, frame): if self.istack == 0: - return + raise EOFError("attempt to seek in a non-stack file") if frame >= self._nimages: raise EOFError("attempt to seek past end of file") self.stkoffset = self.hdrlen + frame * (self.hdrlen + self.imgbytes)