From 7c83d505f8707192f81a6e74c272a668eb62c1c7 Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Tue, 13 Sep 2011 15:17:55 +0200 Subject: [PATCH] IMAP cachefolder: Fix returning None on select We rely on the number of mails being returned by the imapobj.select() call, however that only happens if we "force" a real select() to occur. Pass in the force parameter that I dropped earlier (we did not make use of the return value when I dropped it, that is how it slipped through). Signed-off-by: Sebastian Spaeth Signed-off-by: Nicolas Sebrecht --- offlineimap/folder/IMAP.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/offlineimap/folder/IMAP.py b/offlineimap/folder/IMAP.py index 67603dd..4dcae7d 100644 --- a/offlineimap/folder/IMAP.py +++ b/offlineimap/folder/IMAP.py @@ -120,7 +120,7 @@ class IMAPFolder(BaseFolder): imapobj = self.imapserver.acquireconnection() try: - res_type, imapdata = imapobj.select(self.getfullname(), True) + res_type, imapdata = imapobj.select(self.getfullname(), True, True) if imapdata == [None] or imapdata[0] == '0': # Empty folder, no need to populate message list return