From eb6faf6f02e9e4f471327abd0939f66a54fb4ad4 Mon Sep 17 00:00:00 2001 From: Conchylicultor Date: Wed, 1 Jul 2020 12:20:17 -0700 Subject: [PATCH] Minor str(bytes) call Some environments have strict mode to catch potential str<>bytes error. This is triggered by this line: ``` TiffImagePlugin.py3", line 996, in _open logger.debug("- ifh: {}".format(ifh)) BytesWarning: str() on a bytes instance ``` --- src/PIL/TiffImagePlugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PIL/TiffImagePlugin.py b/src/PIL/TiffImagePlugin.py index 73e9a2763..7d4d8c2a9 100644 --- a/src/PIL/TiffImagePlugin.py +++ b/src/PIL/TiffImagePlugin.py @@ -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)