/offlineimap/head: changeset 271

More work-arounds for imaplib
This commit is contained in:
jgoerzen 2002-10-16 06:43:02 +01:00
parent 51abdbe08a
commit 434233d8c4

View File

@ -18,7 +18,7 @@
from Base import BaseRepository from Base import BaseRepository
from offlineimap import folder, imaputil from offlineimap import folder, imaputil
import re import re, types
from threading import * from threading import *
class IMAPRepository(BaseRepository): class IMAPRepository(BaseRepository):
@ -60,6 +60,10 @@ class IMAPRepository(BaseRepository):
finally: finally:
self.imapserver.releaseconnection(imapobj) self.imapserver.releaseconnection(imapobj)
for string in listresult: for string in listresult:
if type(string) == types.StringType and string == '':
# Bug in imaplib: empty strings in results from
# literals.
continue
flags, delim, name = imaputil.imapsplit(string) flags, delim, name = imaputil.imapsplit(string)
flaglist = [x.lower() for x in imaputil.flagsplit(flags)] flaglist = [x.lower() for x in imaputil.flagsplit(flags)]
if '\\noselect' in flaglist: if '\\noselect' in flaglist: