Make flags a set rather than a list
As this is essentially what it is, a set of values. This allows as to do set arithmetics to see, e.g. the intersection of 2 flag sets rather than clunkily having to do: for flag in newflags: if flag not in oldflags: oldflags.append(flag) Also some more code documenting. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:

committed by
Nicolas Sebrecht

parent
373e7cdbc1
commit
466ded04d9
@@ -21,7 +21,6 @@
|
||||
|
||||
from IMAP import IMAPFolder
|
||||
from offlineimap import imaputil
|
||||
from copy import copy
|
||||
|
||||
|
||||
class GmailFolder(IMAPFolder):
|
||||
@@ -45,7 +44,7 @@ class GmailFolder(IMAPFolder):
|
||||
def deletemessages_noconvert(self, uidlist):
|
||||
uidlist = [uid for uid in uidlist if uid in self.messagelist]
|
||||
if not len(uidlist):
|
||||
return
|
||||
return
|
||||
|
||||
if self.realdelete and not (self.getname() in self.real_delete_folders):
|
||||
# IMAP expunge is just "remove label" in this folder,
|
||||
|
Reference in New Issue
Block a user