MAINT: s/while 1:/while True:/

This commit is contained in:
François Boulogne 2014-01-07 21:21:24 -05:00
parent bed2e429dc
commit 923018dfeb
3 changed files with 3 additions and 3 deletions

View File

@ -248,7 +248,7 @@ class OleFileIO:
if entry[1:2] == "Image":
fin = ole.openstream(entry)
fout = open(entry[0:1], "wb")
while 1:
while True:
s = fin.read(8192)
if not s:
break

View File

@ -1141,7 +1141,7 @@ def _save(im, fp, filename):
# print (im.mode, compression, a, im.encoderconfig)
e = Image._getencoder(im.mode, 'libtiff', a, im.encoderconfig)
e.setimage(im.im, (0,0)+im.size)
while 1:
while True:
l, s, d = e.encode(16*1024) # undone, change to self.decodermaxblock
if not _fp:
fp.write(d)

View File

@ -18,7 +18,7 @@ result = []
class Worker(threading.Thread):
def run(self):
while 1:
while True:
im = queue.get()
if im is None:
queue.task_done()