/head: changeset 20
Fixed several bugs in imaplib, particularly with regard to read()
This commit is contained in:
@ -54,6 +54,7 @@ class IMAPFolder(BaseFolder):
|
||||
return self.messagelist
|
||||
|
||||
def getmessage(self, uid):
|
||||
print "***************** GETMESSAGE %d" % uid
|
||||
assert(self.imapobj.select(self.getfullname())[0] == 'OK')
|
||||
return self.imapobj.uid('fetch', '%d' % uid, '(RFC822)')[1][0][1]
|
||||
|
||||
|
@ -76,14 +76,14 @@ class MaildirFolder(BaseFolder):
|
||||
nouidcounter -= 1
|
||||
else:
|
||||
uid = long(uidmatch.group(1))
|
||||
flagmatch = re.search(':.*2,([A-Z]+)')
|
||||
flagmatch = re.search(':.*2,([A-Z]+)', messagename)
|
||||
flags = []
|
||||
if flagmatch:
|
||||
flags = [f for x in flagmatch.group(1)]
|
||||
flags = [x for x in flagmatch.group(1)]
|
||||
flags.sort()
|
||||
self.messagelist[uid] = {'uid': uid,
|
||||
'flags': flags,
|
||||
'filename': messagename}
|
||||
'filename': file}
|
||||
|
||||
def getmessagelist(self):
|
||||
return self.messagelist
|
||||
|
Reference in New Issue
Block a user