From 434233d8c42beccd9c9999699d1876079288921e Mon Sep 17 00:00:00 2001 From: jgoerzen Date: Wed, 16 Oct 2002 06:43:02 +0100 Subject: [PATCH] /offlineimap/head: changeset 271 More work-arounds for imaplib --- offlineimap/head/offlineimap/repository/IMAP.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/offlineimap/head/offlineimap/repository/IMAP.py b/offlineimap/head/offlineimap/repository/IMAP.py index 9371d0d..24671b4 100644 --- a/offlineimap/head/offlineimap/repository/IMAP.py +++ b/offlineimap/head/offlineimap/repository/IMAP.py @@ -18,7 +18,7 @@ from Base import BaseRepository from offlineimap import folder, imaputil -import re +import re, types from threading import * class IMAPRepository(BaseRepository): @@ -60,6 +60,10 @@ class IMAPRepository(BaseRepository): finally: self.imapserver.releaseconnection(imapobj) 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) flaglist = [x.lower() for x in imaputil.flagsplit(flags)] if '\\noselect' in flaglist: