check prior fp result, do not use if False

This commit is contained in:
chadawagner 2019-07-30 11:26:04 -07:00 committed by Andrew Murray
parent 6de118abd3
commit 88be36c27a

View File

@ -1164,7 +1164,7 @@ class TiffImageFile(ImageFile.ImageFile):
if DEBUG:
print("have getvalue. just sending in a string from getvalue")
n, err = decoder.decode(self.fp.getvalue())
elif hasattr(self.fp, "fileno"):
elif fp:
# we've got a actual file on disk, pass in the fp.
if DEBUG:
print("have fileno, calling fileno version of the decoder.")