[PATCH] Re: Output debug value to see how empty folders are annouced
Nicolas Sebrecht
nicolas.s-dev at laposte.net
Wed Sep 7 18:23:59 BST 2011
On Wed, Sep 07, 2011 at 03:04:23PM +0200, Sebastian Spaeth wrote:
> 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:*'
No output, the value is 0. :-)
--
Nicolas Sebrecht
More information about the OfflineIMAP-project
mailing list