[imaplib2 removal] Revert "Added check for IDLE in capabilities"
This reverts commit 17ec4df02a8d1440aac5634b2516555a5f841046.
This commit is contained in:
parent
a3a0a68163
commit
8e1fc71879
@ -406,8 +406,8 @@ class IdleThread(object):
|
|||||||
|
|
||||||
def noop(self):
|
def noop(self):
|
||||||
imapobj = self.parent.acquireconnection()
|
imapobj = self.parent.acquireconnection()
|
||||||
imapobj.noop()
|
|
||||||
self.event.wait()
|
self.event.wait()
|
||||||
|
imapobj.noop()
|
||||||
self.parent.releaseconnection(imapobj)
|
self.parent.releaseconnection(imapobj)
|
||||||
|
|
||||||
def dosync(self):
|
def dosync(self):
|
||||||
@ -434,10 +434,7 @@ class IdleThread(object):
|
|||||||
self.needsync = True
|
self.needsync = True
|
||||||
self.event.set()
|
self.event.set()
|
||||||
imapobj = self.parent.acquireconnection()
|
imapobj = self.parent.acquireconnection()
|
||||||
if "IDLE" in imapobj.capabilities:
|
imapobj.idle(callback=callback)
|
||||||
imapobj.idle(callback=callback)
|
|
||||||
else:
|
|
||||||
imapobj.noop()
|
|
||||||
self.event.wait()
|
self.event.wait()
|
||||||
if self.event.isSet():
|
if self.event.isSet():
|
||||||
imapobj.noop()
|
imapobj.noop()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user