1
0
mirror of https://github.com/OfflineIMAP/offlineimap.git synced 2024-06-28 07:40:51 +02:00

helpful comments

This commit is contained in:
Adam Spiers 2006-05-16 04:40:23 +01:00
parent 2b9d6f9fdc
commit 5fc0e1ae42

View File

@ -234,6 +234,7 @@ class IMAPFolder(BaseFolder):
ui.debug('imap', 'savemessage: first attempt to get new UID')
uid = self.savemessage_searchforheader(imapobj, headername,
headervalue)
# See docs for savemessage in Base.py for explanation of this and other return values
if uid <= 0:
ui.debug('imap', 'savemessage: first attempt to get new UID failed. Going to run a NOOP and try again.')
assert(imapobj.noop()[0] == 'OK')
@ -242,8 +243,9 @@ class IMAPFolder(BaseFolder):
finally:
self.imapserver.releaseconnection(imapobj)
if uid:
if uid: # avoid UID FETCH 0 crash happening later on
self.messagelist[uid] = {'uid': uid, 'flags': flags}
ui.debug('imap', 'savemessage: returning %d' % uid)
return uid