mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-29 01:13:34 +03:00
Rename bytes variable as read_bytes to avoid the built-in function name.
This commit is contained in:
parent
d594c0241a
commit
14c2f86873
|
@ -413,7 +413,7 @@ class PngImageFile(ImageFile.ImageFile):
|
||||||
|
|
||||||
ImageFile.ImageFile.load_prepare(self)
|
ImageFile.ImageFile.load_prepare(self)
|
||||||
|
|
||||||
def load_read(self, bytes):
|
def load_read(self, read_bytes):
|
||||||
"internal: read more image data"
|
"internal: read more image data"
|
||||||
|
|
||||||
while self.__idat == 0:
|
while self.__idat == 0:
|
||||||
|
@ -430,14 +430,14 @@ class PngImageFile(ImageFile.ImageFile):
|
||||||
self.__idat = length # empty chunks are allowed
|
self.__idat = length # empty chunks are allowed
|
||||||
|
|
||||||
# read more data from this chunk
|
# read more data from this chunk
|
||||||
if bytes <= 0:
|
if read_bytes <= 0:
|
||||||
bytes = self.__idat
|
read_bytes = self.__idat
|
||||||
else:
|
else:
|
||||||
bytes = min(bytes, self.__idat)
|
read_bytes = min(read_bytes, self.__idat)
|
||||||
|
|
||||||
self.__idat = self.__idat - bytes
|
self.__idat = self.__idat - read_bytes
|
||||||
|
|
||||||
return self.fp.read(bytes)
|
return self.fp.read(read_bytes)
|
||||||
|
|
||||||
|
|
||||||
def load_end(self):
|
def load_end(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user