Prettify and use new uidexists() helper function

Make the folder classes use uidexists() more. Add some code
documentation while going through.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Sebastian Spaeth
2011-05-07 11:11:20 +02:00
committed by Nicolas Sebrecht
parent 0318c6ad34
commit f4081985dc
2 changed files with 10 additions and 2 deletions

View File

@ -562,7 +562,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