From fce11e0b7b48339e88f552654b7d96457f97868a Mon Sep 17 00:00:00 2001 From: wiredfool Date: Sun, 13 Sep 2015 14:31:49 +0100 Subject: [PATCH] Revert "Style changes" --- PIL/TiffImagePlugin.py | 16 ++++++++++------ mp_compile.py | 6 ++++-- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/PIL/TiffImagePlugin.py b/PIL/TiffImagePlugin.py index 4d16ced48..b0e7c9639 100644 --- a/PIL/TiffImagePlugin.py +++ b/PIL/TiffImagePlugin.py @@ -428,7 +428,8 @@ class ImageFileDirectory(collections.MutableMapping): ifd = fp.read(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))) continue @@ -466,8 +467,9 @@ class ImageFileDirectory(collections.MutableMapping): data = ifd[8:8+size] if len(data) != size: - warnings.warn("Possibly corrupt EXIF data. Expecting to read %d bytes but only got %d. Skipping tag %s" - % (size, len(data), tag)) + warnings.warn("Possibly corrupt EXIF data. " + "Expecting to read %d bytes but only got %d. " + "Skipping tag %s" % (size, len(data), tag)) continue self.tagdata[tag] = data @@ -482,7 +484,8 @@ class ImageFileDirectory(collections.MutableMapping): ifd = fp.read(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))) return @@ -701,8 +704,9 @@ class TiffImageFile(ImageFile.ImageFile): if not self.__next: raise EOFError("no more images in TIFF file") if DEBUG: - print("Seeking to frame %s, on frame %s, __next %s, location: %s" - % (frame, self.__frame, self.__next, self.fp.tell())) + print("Seeking to frame %s, on frame %s, " + "__next %s, location: %s" % + (frame, self.__frame, self.__next, self.fp.tell())) # reset python3 buffered io handle in case fp # was passed to libtiff, invalidating the buffer self.fp.tell() diff --git a/mp_compile.py b/mp_compile.py index 93ddbe99b..078f62476 100644 --- a/mp_compile.py +++ b/mp_compile.py @@ -75,8 +75,10 @@ def install(): pool = Pool(2) CCompiler.compile = _mp_compile except Exception as msg: - print("Exception installing mp_compile, proceeding without: %s" % msg) + print("Exception installing mp_compile, proceeding without:" + "%s" % msg) 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()