[PATCH] Syncing gmail labels for gmail accounts

Abdó Roig-Maranges abdo.roig at gmail.com
Thu Nov 22 16:41:27 GMT 2012


Hi Dima and Tomasz,

> in Python documentation for re.sub() you can find: "Changed in version 3.1:
> Added the optional flags argument". So the code in this patch will work
> only with Python 3.1+. I did not look in the code, just the stack trace you
> posted, but I guess we can do without using the optional "flags" in re.sub,
> can't we? Then the patch would be compatible with older Python
> versions.

Thanks! It seems that for python 2 the flags argument for re.sub was
introduced in 2.7, so post-2.7 users are fine.

I don't want to get rid of the re.MULTILINE, to be able to match
^ and $. Now I compile the regexp, which should work on older python's.

Here I attach a patch. You can pull the whole thing from

https://github.com/aroig/offlineimap.git

Let me now if there are other issues. I don't have any pre-2.7 python at
hand to test...

Abdó.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sub.patch
Type: text/x-patch
Size: 1710 bytes
Desc: patch
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20121122/830a4472/attachment-0003.bin>


More information about the OfflineIMAP-project mailing list