Folder.Maildir: No need to store 'uid' in messagelist dict.

The Message UID is already the key to self.messagelist, so we have that
information. It is redundant to save the UID again as
self.messagelist[uid]{'uid': uid} and we never made use of the
information anyway.

The same thing should be done with the other 2 backends.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
Sebastian Spaeth 2011-08-30 11:19:53 +02:00
parent dfdc4d457b
commit 32ca20d0da

View File

@ -165,10 +165,8 @@ class MaildirFolder(BaseFolder):
flags = set(flagmatch.group(1))
else:
flags = set()
# 'filename' is 'dirannex/filename', e.g. cur/123_U=1_FMD5=1:2,S
retval[uid] = {'uid': uid,
'flags': flags,
'filename': file}
# 'filename' is 'dirannex/filename', e.g. cur/123,U=1,FMD5=1:2,S
retval[uid] = {'flags': flags, 'filename': file}
return retval
def quickchanged(self, statusfolder):
@ -255,7 +253,7 @@ class MaildirFolder(BaseFolder):
if rtime != None:
os.utime(os.path.join(tmpdir, messagename), (rtime, rtime))
self.messagelist[uid] = {'uid': uid, 'flags': set(),
self.messagelist[uid] = {'flags': set(),
'filename': os.path.join('tmp', messagename)}
# savemessageflags moves msg to 'cur' or 'new' as appropriate
self.savemessageflags(uid, flags)