/head: changeset 19

*** empty log message ***
This commit is contained in:
jgoerzen
2002-06-20 12:39:27 +01:00
parent 3c199703c2
commit 036b3d10b6
4 changed files with 14 additions and 4 deletions

View File

@ -65,7 +65,11 @@ class BaseFolder:
If the backend cannot assign a new uid, it returns the uid passed in.
IMAP backend should be the only one that can assign a new uid.
If the uid is < 0 and the backend cannot assign a new UID, it is
required to TAKE NO ACTION other than returning the uid passed in."""
required to TAKE NO ACTION other than returning the uid passed in.
If the uid is > 0, the backend should set the uid to this, if it can.
It will return the uid assigned in any case.
"""
raise NotImplementedException
def getmessageflags(self, uid):

View File

@ -53,5 +53,10 @@ class IMAPFolder(BaseFolder):
def getmessagelist(self):
return self.messagelist
def getmessage(self, uid):
assert(self.imapobj.select(self.getfullname())[0] == 'OK')
return self.imapobj.uid('fetch', '%d' % uid, '(RFC822)')[1][0][1]
def getmessageflags(self, uid):
return self.getmessagelist()[uid]['flags']