diff --git a/Changelog.rst b/Changelog.rst index aa0d903..f126075 100644 --- a/Changelog.rst +++ b/Changelog.rst @@ -15,6 +15,8 @@ WIP (add new stuff for the next release) * Fix str.format() calls for Python 2.6 (D. Logie) * Remove APPENDUID hack, previously introduced to fix Gmail, no longer necessary, it might have been breaking things. (J. Wiegley) +* Improve regex that could lead to 'NoneType' object has no attribute 'group' + (D. Franke) OfflineIMAP v6.5.4 (2012-06-02) =============================== diff --git a/offlineimap/imaputil.py b/offlineimap/imaputil.py index 557064b..fe69b7a 100644 --- a/offlineimap/imaputil.py +++ b/offlineimap/imaputil.py @@ -23,7 +23,7 @@ from offlineimap.ui import getglobalui # find the first quote in a string quotere = re.compile( - r"""(?P"(?:\\"|[^"])*") # Quote, possibly containing encoded + r"""(?P"[^\"\\]*(?:\\"|[^"])*") # Quote, possibly containing encoded # quotation mark \s*(?P.*)$ # Whitespace & remainder of string""", re.VERBOSE)