[PATCH] Output debug value to see how empty folders are annouced
Sebastian Spaeth
Sebastian at SSpaeth.de
Wed Sep 7 14:04:23 BST 2011
Nicolas can use this one to tell me what value is being returned for an
empty folder here. I always get '1' even for empty ones here, and
FETCHING an empty folder doesn't lead to a NO error message either, so I
cannot test this. If we know the value, we can skip empty folders a bit
quicker.
It would be cool if Nicolas or anyone who sees these exceptions could
try it out and tell be the debug output you would get in the lines with:
Have Nicolas tell Sebastian this value: ...
Thanks :)
Signed-off-by: Sebastian Spaeth <Sebastian at SSpaeth.de>
---
offlineimap/folder/IMAP.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/offlineimap/folder/IMAP.py b/offlineimap/folder/IMAP.py
index 5a14776..d202283 100644
--- a/offlineimap/folder/IMAP.py
+++ b/offlineimap/folder/IMAP.py
@@ -121,6 +121,8 @@ class IMAPFolder(BaseFolder):
try:
res_type, imapdata = imapobj.select(self.getfullname(), True)
+ if not imapdata[0] > 0:
+ self.ui.warn("Have Nicolas tell Sebastian this value: %s %s " % (self, str(imapdata)))
# By default examine all UIDs in this folder
msgsToFetch = '1:*'
--
1.7.4.1
More information about the OfflineIMAP-project
mailing list