docker-offlineimap/offlineimap/folder
Sebastian Spaeth e145beb394 Fix "command CHECK illegal in state AUTH"
Dave identified a case where our new dropped connection handling did
not work out correctly: we use the retry_left variable to signify
success (0=success if no exception occured).

However, we were decrementing the variable AFTER all the exception
checks, so if there was one due to a dropped connection, it
could well be that we 1) did not raise an exception (because we want to
retry), and 2) then DECREMENTED retry_left, which indicated "all is
well, no need to retry".

The code then continued to check() the append, which failed with the
above message (because we obtained a new connection which had not even
selected the current folder and we were still in mode AUTH). The fix is
of course, to fix our logic: Decrement retry_left first, THEN decide
whether to raise() (retry_left==0) or retry (retry_left>0) which would
then correctly attempt another loop. I am sorry for this newbie type of
logic error. The retry count loop was too hastily slipped in, it seems.

Reported-by: Dave Abrahams <dave@boostpro.com>
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-09-26 16:13:52 +02:00
..
__init__.py Add Gmail IMAP special support. 2008-01-03 04:56:55 +01:00
Base.py Folder: Force top-level folder visiblename to '' 2011-09-23 14:31:49 +02:00
Gmail.py Remove visiblename as parameter to IMAPFolder creation 2011-09-16 12:54:29 +02:00
IMAP.py Fix "command CHECK illegal in state AUTH" 2011-09-26 16:13:52 +02:00
LocalStatus.py Don't pass in 'root' as para to LocalStatusFolders 2011-09-16 12:54:12 +02:00
LocalStatusSQLite.py Don't pass in 'root' as para to LocalStatusFolders 2011-09-16 12:54:12 +02:00
Maildir.py Folder.Maildir: No need to store 'uid' in messagelist dict. 2011-09-19 10:01:31 +02:00
UIDMaps.py Replaced tabs with spaces to unify python sources 2011-08-16 22:33:19 +02:00