1
0
mirror of https://github.com/OfflineIMAP/offlineimap.git synced 2024-06-26 07:29:03 +02:00

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.stop()
while True:
if self.stop_sig.isSet():
return
while not self.stop_sig.isSet():
self.needsync = False
self.imapaborted = False