[PATCH 12/17] Re: Use new getmessagecount getmessageuidlist and uidexists functions
Nicolas Sebrecht
nicolas.s-dev at laposte.net
Thu Dec 2 23:39:51 GMT 2010
On Mon, Nov 29, 2010 at 05:02:20PM +0100, Sebastian Spaeth wrote:
>
> Where appropriate
Is there places where this is not appropriate?
> @@ -465,7 +465,7 @@ class IMAPFolder(BaseFolder):
>
> def deletemessages_noconvert(self, uidlist):
> # Weed out ones not in self.messagelist
> - uidlist = [uid for uid in uidlist if uid in self.messagelist]
> + uidlist = [uid for uid in uidlist if self.uidexists(uid)]
> if not len(uidlist):
> return
This changeset...
> diff --git a/offlineimap/folder/Maildir.py b/offlineimap/folder/Maildir.py
> index c93fcc1..09a9a90 100644
> --- a/offlineimap/folder/Maildir.py
> +++ b/offlineimap/folder/Maildir.py
> @@ -291,8 +291,16 @@ class MaildirFolder(BaseFolder):
> assert final_dir != tmpdir
>
> def deletemessage(self, uid):
> - if not uid in self.messagelist:
<...>
> + if not self.uidexists(uid):
> return
...and this one should be squashed to the previous patch.
--
Nicolas Sebrecht
More information about the OfflineIMAP-project
mailing list