except imapobj.abort() -> except imapobj.abort
When checking for the IMAP4.abort() exception, we need of course to perform: except imapobj.abort: and not except imapobj.abort(): Thanks to Johannes Stezenbach <js@sig21.net> for pointing to the glitch. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
parent
ae8a1cb79f
commit
4bfc1e8227
@ -209,7 +209,7 @@ class IMAPFolder(BaseFolder):
|
|||||||
res_type, data = imapobj.uid('fetch', str(uid),
|
res_type, data = imapobj.uid('fetch', str(uid),
|
||||||
'(BODY.PEEK[])')
|
'(BODY.PEEK[])')
|
||||||
fails_left = 0
|
fails_left = 0
|
||||||
except imapobj.abort(), e:
|
except imapobj.abort, e:
|
||||||
# Release dropped connection, and get a new one
|
# Release dropped connection, and get a new one
|
||||||
self.imapserver.releaseconnection(imapobj, True)
|
self.imapserver.releaseconnection(imapobj, True)
|
||||||
imapobj = self.imapserver.acquireconnection()
|
imapobj = self.imapserver.acquireconnection()
|
||||||
|
@ -549,7 +549,7 @@ class IdleThread(object):
|
|||||||
try:
|
try:
|
||||||
# End IDLE mode with noop, imapobj can point to a dropped conn.
|
# End IDLE mode with noop, imapobj can point to a dropped conn.
|
||||||
imapobj.noop()
|
imapobj.noop()
|
||||||
except imapobj.abort():
|
except imapobj.abort:
|
||||||
self.ui.warn('Attempting NOOP on dropped connection %s' % \
|
self.ui.warn('Attempting NOOP on dropped connection %s' % \
|
||||||
imapobj.identifier)
|
imapobj.identifier)
|
||||||
self.parent.releaseconnection(imapobj, True)
|
self.parent.releaseconnection(imapobj, True)
|
||||||
|
Loading…
Reference in New Issue
Block a user