mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
MAINT: s/while 1:/while True:/
This commit is contained in:
parent
bed2e429dc
commit
923018dfeb
|
@ -248,7 +248,7 @@ class OleFileIO:
|
||||||
if entry[1:2] == "Image":
|
if entry[1:2] == "Image":
|
||||||
fin = ole.openstream(entry)
|
fin = ole.openstream(entry)
|
||||||
fout = open(entry[0:1], "wb")
|
fout = open(entry[0:1], "wb")
|
||||||
while 1:
|
while True:
|
||||||
s = fin.read(8192)
|
s = fin.read(8192)
|
||||||
if not s:
|
if not s:
|
||||||
break
|
break
|
||||||
|
|
|
@ -1141,7 +1141,7 @@ def _save(im, fp, filename):
|
||||||
# print (im.mode, compression, a, im.encoderconfig)
|
# print (im.mode, compression, a, im.encoderconfig)
|
||||||
e = Image._getencoder(im.mode, 'libtiff', a, im.encoderconfig)
|
e = Image._getencoder(im.mode, 'libtiff', a, im.encoderconfig)
|
||||||
e.setimage(im.im, (0,0)+im.size)
|
e.setimage(im.im, (0,0)+im.size)
|
||||||
while 1:
|
while True:
|
||||||
l, s, d = e.encode(16*1024) # undone, change to self.decodermaxblock
|
l, s, d = e.encode(16*1024) # undone, change to self.decodermaxblock
|
||||||
if not _fp:
|
if not _fp:
|
||||||
fp.write(d)
|
fp.write(d)
|
||||||
|
|
|
@ -18,7 +18,7 @@ result = []
|
||||||
|
|
||||||
class Worker(threading.Thread):
|
class Worker(threading.Thread):
|
||||||
def run(self):
|
def run(self):
|
||||||
while 1:
|
while True:
|
||||||
im = queue.get()
|
im = queue.get()
|
||||||
if im is None:
|
if im is None:
|
||||||
queue.task_done()
|
queue.task_done()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user