docker-offlineimap/offlineimap
John Goerzen db805043f2 Attempt to fix a crashing bug in Gmail driver
refs deb#469598

Bug report received in Debian.  User is having occasional trouble with Gmail
driver crashing, indicates problem may have started after switching to Gmail.

Gmail driver merged to tree in 81b86fb74 on 2008-01-03 and recently released
in beta tarballs.

BT shows:

  File "/var/lib/python-support/python2.4/offlineimap/folder/Gmail.py", line 102, in processmessagesflags
    attributehash = imaputil.flags2hash(imaputil.imapsplit(result)[1])
  File "/var/lib/python-support/python2.4/offlineimap/imaputil.py", line 88, in imapsplit
    for i in range(len(imapstring)):
TypeError: len() of unsized object

imap debug log shows:

imap:   29:58.16 > BEAL75 UID STORE 4887 +FLAGS (\Deleted)
imap:   29:58.47 < BEAL75 OK Success
imap:   29:58.47        matched r'(?P<tag>BEAL\d+) (?P<type>[A-Z]+) (?P<data>.*)' => ('BEAL75', 'OK', 'Success')
imap: imapsplit() called with input: None
imap: imapsplit() got a non-string input; working around.

looking at code for Gmail.py processmessagesflags, comments from Ricardo
indicate it was copied from the same function in folder/IMAP.py.

However, folder/IMAP.py has checks for this, added 2002-07-12 in
5342dacc & 817a10ce.  Suspect that Gmail author believed those checks
superfluous for Gmail.

Copied checks from folder/IMAP.py to folder/Gmail.py.
2008-03-08 07:47:53 -06:00
..
folder Attempt to fix a crashing bug in Gmail driver 2008-03-08 07:47:53 -06:00
repository Make makefolder use same temporary name as folder/LocalStatus/save 2008-03-03 12:59:40 -06:00
ui Fixed locked() for noninteractive UIs 2007-10-10 00:12:22 +01:00
__init__.py Step 2 of SVN to arch tree conversion 2005-04-16 20:33:35 +01:00
accounts.py Infrastructure for notifying LocalStatus of local mailbox creations 2008-03-02 22:17:45 -06:00
CustomConfig.py Update FSF address 2006-08-12 05:15:55 +01:00
imaplibutil.py Fix performance for SSL 2008-03-03 08:22:44 -06:00
imapserver.py Fix performance for SSL 2008-03-03 08:22:44 -06:00
imaputil.py Update FSF address 2006-08-12 05:15:55 +01:00
init.py Add option '-f' for sync'ing only selected folders 2008-01-03 04:15:11 +01:00
localeval.py Update FSF address 2006-08-12 05:15:55 +01:00
mbnames.py Update FSF address 2006-08-12 05:15:55 +01:00
syncmaster.py Clean up imaplib imports 2007-07-04 18:53:48 +01:00
threadutil.py Update FSF address 2006-08-12 05:15:55 +01:00
version.py Update for 5.99.7 2008-03-04 08:32:29 -06:00