[PATCH 2/2] Re: Error proof IMAP.APPEND against dropped connections
Nicolas Sebrecht
nicolas.s-dev at laposte.net
Mon Sep 12 18:59:39 BST 2011
On Tue, Sep 06, 2011 at 01:19:26PM +0200, Sebastian Spaeth wrote:
> Make sure that when a connection is dropped during append, we really
> discard the broken connection and get a new one, retrying. We retry
> indefinitely on the specific abort() Exception, as this is what imaplib2
> suggests us to do.
I think we need to squash this patch:
diff --git a/offlineimap/folder/IMAP.py b/offlineimap/folder/IMAP.py
index ffd9fba..61496ce 100644
--- a/offlineimap/folder/IMAP.py
+++ b/offlineimap/folder/IMAP.py
@@ -99,7 +99,7 @@ class IMAPFolder(BaseFolder):
True)
except OfflineImapError, e:
# retry on dropped connections, raise otherwise
- self.imapserver.releaseconnection(imapobj, true)
+ self.imapserver.releaseconnection(imapobj, True)
if e.severity == OfflineImapError.ERROR.FOLDER_RETRY:
retry = True
else: raise
@@ -117,7 +117,7 @@ class IMAPFolder(BaseFolder):
# Different number of messages than last time?
if maxmsgid != statusfolder.getmessagecount():
return True
- return False
+ return False
--
Nicolas Sebrecht
More information about the OfflineIMAP-project
mailing list