From ebc6996ba5790744724ecdd81dfb24920aca7ef0 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 2 Apr 2015 16:35:52 +1100 Subject: [PATCH] Changed list comprehension variable name to avoid redefinition --- PIL/EpsImagePlugin.py | 2 +- PIL/TiffImagePlugin.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PIL/EpsImagePlugin.py b/PIL/EpsImagePlugin.py index 83024b63f..62e438f0d 100644 --- a/PIL/EpsImagePlugin.py +++ b/PIL/EpsImagePlugin.py @@ -248,7 +248,7 @@ class EpsImageFile(ImageFile.ImageFile): # Note: The DSC spec says that BoundingBox # fields should be integers, but some drivers # put floating point values there anyway. - box = [int(float(s)) for s in v.split()] + box = [int(float(i)) for i in v.split()] self.size = box[2] - box[0], box[3] - box[1] self.tile = [("eps", (0, 0) + self.size, offset, (length, box))] diff --git a/PIL/TiffImagePlugin.py b/PIL/TiffImagePlugin.py index e4028fdbb..ec1c84220 100644 --- a/PIL/TiffImagePlugin.py +++ b/PIL/TiffImagePlugin.py @@ -978,7 +978,7 @@ class TiffImageFile(ImageFile.ImageFile): # fixup palette descriptor if self.mode == "P": - palette = [o8(a // 256) for a in self.tag[COLORMAP]] + palette = [o8(b // 256) for b in self.tag[COLORMAP]] self.palette = ImagePalette.raw("RGB;L", b"".join(palette)) # # --------------------------------------------------------------------