IMAP IDLE cleanup(4): Simplify code

while True: if a: return

is equivalent to

   while not a:

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Sebastian Spaeth 2011-09-12 10:37:56 +02:00 committed by Nicolas Sebrecht
parent 6ad0de08ef
commit 59753fc06f

View File

@ -514,9 +514,7 @@ class IdleThread(object):
self.imapaborted = True self.imapaborted = True
self.stop() self.stop()
while True: while not self.stop_sig.isSet():
if self.stop_sig.isSet():
return
self.needsync = False self.needsync = False
self.imapaborted = False self.imapaborted = False