mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-13 05:06:49 +03:00
Revert "Style changes"
This commit is contained in:
parent
a183fc4030
commit
fce11e0b7b
|
@ -428,7 +428,8 @@ class ImageFileDirectory(collections.MutableMapping):
|
||||||
|
|
||||||
ifd = fp.read(12)
|
ifd = fp.read(12)
|
||||||
if len(ifd) != 12:
|
if len(ifd) != 12:
|
||||||
warnings.warn("Possibly corrupt EXIF data. Expecting to read 12 bytes but only got %d."
|
warnings.warn("Possibly corrupt EXIF data. "
|
||||||
|
"Expecting to read 12 bytes but only got %d."
|
||||||
% (len(ifd)))
|
% (len(ifd)))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -466,8 +467,9 @@ class ImageFileDirectory(collections.MutableMapping):
|
||||||
data = ifd[8:8+size]
|
data = ifd[8:8+size]
|
||||||
|
|
||||||
if len(data) != size:
|
if len(data) != size:
|
||||||
warnings.warn("Possibly corrupt EXIF data. Expecting to read %d bytes but only got %d. Skipping tag %s"
|
warnings.warn("Possibly corrupt EXIF data. "
|
||||||
% (size, len(data), tag))
|
"Expecting to read %d bytes but only got %d. "
|
||||||
|
"Skipping tag %s" % (size, len(data), tag))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
self.tagdata[tag] = data
|
self.tagdata[tag] = data
|
||||||
|
@ -482,7 +484,8 @@ class ImageFileDirectory(collections.MutableMapping):
|
||||||
|
|
||||||
ifd = fp.read(4)
|
ifd = fp.read(4)
|
||||||
if len(ifd) != 4:
|
if len(ifd) != 4:
|
||||||
warnings.warn("Possibly corrupt EXIF data. Expecting to read 4 bytes but only got %d."
|
warnings.warn("Possibly corrupt EXIF data. "
|
||||||
|
"Expecting to read 4 bytes but only got %d."
|
||||||
% (len(ifd)))
|
% (len(ifd)))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -701,8 +704,9 @@ class TiffImageFile(ImageFile.ImageFile):
|
||||||
if not self.__next:
|
if not self.__next:
|
||||||
raise EOFError("no more images in TIFF file")
|
raise EOFError("no more images in TIFF file")
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
print("Seeking to frame %s, on frame %s, __next %s, location: %s"
|
print("Seeking to frame %s, on frame %s, "
|
||||||
% (frame, self.__frame, self.__next, self.fp.tell()))
|
"__next %s, location: %s" %
|
||||||
|
(frame, self.__frame, self.__next, self.fp.tell()))
|
||||||
# reset python3 buffered io handle in case fp
|
# reset python3 buffered io handle in case fp
|
||||||
# was passed to libtiff, invalidating the buffer
|
# was passed to libtiff, invalidating the buffer
|
||||||
self.fp.tell()
|
self.fp.tell()
|
||||||
|
|
|
@ -75,8 +75,10 @@ def install():
|
||||||
pool = Pool(2)
|
pool = Pool(2)
|
||||||
CCompiler.compile = _mp_compile
|
CCompiler.compile = _mp_compile
|
||||||
except Exception as msg:
|
except Exception as msg:
|
||||||
print("Exception installing mp_compile, proceeding without: %s" % msg)
|
print("Exception installing mp_compile, proceeding without:"
|
||||||
|
"%s" % msg)
|
||||||
else:
|
else:
|
||||||
print("Single threaded build, not installing mp_compile: %s processes" % MAX_PROCS)
|
print("Single threaded build, not installing mp_compile:"
|
||||||
|
"%s processes" % MAX_PROCS)
|
||||||
|
|
||||||
install()
|
install()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user