Merge pull request #4753 from Conchylicultor/patch-1

Minor fix: remove str(bytes) call
This commit is contained in:
Andrew Murray 2020-07-04 20:35:27 +10:00 committed by GitHub
commit 7aaf021822
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -776,7 +776,7 @@ class ImageFileDirectory_v2(MutableMapping):
self.tagtype[tag] = typ
msg += " - value: " + (
"<table: %d bytes>" % size if size > 32 else str(data)
"<table: %d bytes>" % size if size > 32 else repr(data)
)
logger.debug(msg)
@ -993,7 +993,7 @@ class TiffImageFile(ImageFile.ImageFile):
logger.debug("*** TiffImageFile._open ***")
logger.debug("- __first: {}".format(self.__first))
logger.debug("- ifh: {}".format(ifh))
logger.debug("- ifh: {!r}".format(ifh)) # Use !r to avoid str(bytes)
# and load the first frame
self._seek(0)