/head: changeset 109

Another go at dealing with weird STORE responses.
This commit is contained in:
jgoerzen 2002-07-12 03:04:04 +01:00
parent f9851884be
commit 5342dacc6c

View File

@ -151,9 +151,15 @@ class IMAPFolder(BaseFolder):
needupdate = copy(uidlist) needupdate = copy(uidlist)
for result in r: for result in r:
if result == None: if result == None:
# Compensate for servers that don't return anything from
# STORE.
continue continue
flags = imaputil.flags2hash(imaputil.imapsplit(result)[1])['FLAGS'] attributehash = imaputil.flags2hash(imaputil.imapsplit(result)[1])
uid = long(imaputil.flags2hash(imaputil.imapsplit(result)[1])['UID']) if not ('UID' in attributehash and 'FLAGS' in attributehash):
# Compensate for servers that don't return a UID attribute.
continue
flags = attributehash['FLAGS']
uid = long(attributehash['UID'])
self.messagelist[uid]['flags'] = imaputil.flagsimap2maildir(flags) self.messagelist[uid]['flags'] = imaputil.flagsimap2maildir(flags)
try: try:
needupdate.remove(uid) needupdate.remove(uid)