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": 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

View File

@ -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)

View File

@ -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()