[PATCH] More detailed error output on corrupt UID mapping files

Sebastian Spaeth Sebastian at SSpaeth.de
Tue May 3 14:52:30 BST 2011


On Mon, 2 May 2011 14:40:58 -0700 (PDT), chris coleman  wrote:
> The catch is, 6.3.2-0 code for offlineimap/offlineimap/folder/IMAP.py is using imapobj not imapdata - so it seems like your patch would need modification to fit.
> 
> Here is the code excerpted from lines 175-188:

>                     for msgid in imapobj.untagged_responses['EXISTS']:
>                         maxmsgid = max(long(msgid), maxmsgid)
 
> Your suggestion on how to patch this ?

Oh, yes that code has changed since, and 6.3.3 might exhibit different
behavior actually. If you want to see what's coming from the IMAP server
do wrap the line with long() into a try: and bump out if it fails:

                    for msgid in imapobj.untagged_responses['EXISTS']:
                        try:
                            maxmsgid = max(long(msgid), maxmsgid)
                        except:
                            raise Exception(str(msgid))

Would be interested what you are seeing.

Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20110503/b553558a/attachment-0001.sig>


More information about the OfflineIMAP-project mailing list