offlineimap stops working on 6.3.3 -> 6.4.2 upgrade

Sebastian Spaeth Sebastian at SSpaeth.de
Sat Jan 7 11:19:59 GMT 2012


On Sat, 17 Dec 2011 21:56:54 -0000, "Sean Whitton" wrote:
> I just upgraded offlineimap from 6.3.3 to 6.4.2.  On an attempt to sync I
> am now getting this error:

Hi there, sorry for the late reply.

1) Please upgrade to 6.5.0. The 6.4.x is truly borked, I am sorry for
that.
2) Yes, you got caught in a code change of the offlineimap
internals. Flags are now a set, and not a list anymore (because that is
logically what they are, a set of flags). You'll need minor adaptations:

> This is my python file:
> | def lld_flagsimap2maildir(flagstring):
...
> |   for imapflag in imapflaglist:
> |       if flagmap.has_key(imapflag):
> |           retval.append(flagmap[imapflag])
> |-   retval.sort()
> |-   return retval
> |+   return set(retval)

That should essentially do that.

> | def lld_flagsmaildir2imap(list):
> |   flagmap = {'S': '\\Seen',
> |              'R': '\\Answered',
> |              'F': '\\Flagged',
> |              'T': '\\Deleted',
> |              'D': '\\Draft',
> |              'E': 'gnus-expire',
> |              'Q': 'gnus-dormant',
> |              'W': 'gnus-forward',
> |              'V': 'gnus-save'}
> |   retval = []
> |   for mdflag in list:
> |       if flagmap.has_key(mdflag):
> |           retval.append(flagmap[mdflag])
> |   retval.sort()
> |   return '(' + ' '.join(retval) + ')'

That should be fine.

Hope this is still in time to help you solve your problem. That having
said, I have long term plans to let us map more maildir and IMAP flags
via the configuration file, I would love to e.g. also sync my "\\Junk"
IMAP flags and others. But that is still a bit out in the future.

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/20120107/f1fc3c16/attachment.sig>


More information about the OfflineIMAP-project mailing list