[PATCH] IMAP cachefolder: Fix returning None on select

Sebastian Spaeth Sebastian at SSpaeth.de
Tue Sep 13 14:17:55 BST 2011

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 <Sebastian at SSpaeth.de>
 offlineimap/folder/IMAP.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/offlineimap/folder/IMAP.py b/offlineimap/folder/IMAP.py
index f3d1ad8..4ecd591 100644
--- a/offlineimap/folder/IMAP.py
+++ b/offlineimap/folder/IMAP.py
@@ -120,7 +120,7 @@ class IMAPFolder(BaseFolder):
         imapobj = self.imapserver.acquireconnection()
-            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

More information about the OfflineIMAP-project mailing list