A fix for bug with IMAP server not supporting APPENDUID

Tomasz Żok tomasz.zok at gmail.com
Tue May 29 09:17:12 BST 2012


Hi,

nearly a month ago (2012-04-30 10:47:23 GMT) I sent a bug report about errors
during sync and emails being repeated. I got no response to this, so I looked
at it myself today. I am attaching a fix and paste a diff here - it was really
a trivial one:

In file: /usr/lib/python2.7/site-packages/offlineimap/folder/IMAP.py

585c585
<                 if resp == [None]:
---
>                 if not resp or resp == [None]:


The bug was that with my IMAP server, the resp variable was None itself, not a
list with None inside.

Best regards,
Tomasz Zok
-------------- next part --------------
*** IMAP.py	2012-04-03 01:39:28.000000000 +0200
--- /usr/lib/python2.7/site-packages/offlineimap/folder/IMAP.py	2012-05-29 10:04:06.606412972 +0200
***************
*** 582,588 ****
                  # often seems to return [None], even though we have
                  # data. TODO
                  resp = imapobj._get_untagged_response('APPENDUID')
!                 if resp == [None]:
                      self.ui.warn("Server supports UIDPLUS but got no APPENDUID "
                                   "appending a message.")
                      return 0
--- 582,588 ----
                  # often seems to return [None], even though we have
                  # data. TODO
                  resp = imapobj._get_untagged_response('APPENDUID')
!                 if not resp or resp == [None]:
                      self.ui.warn("Server supports UIDPLUS but got no APPENDUID "
                                   "appending a message.")
                      return 0


More information about the OfflineIMAP-project mailing list