|
|
|
Fix reply by email for long subject lines.
BUG=392
Patch Set 1 #
Total messages: 3
|
JohnA
This was bugging me enough that I download mercurial and started to use it :) ...
|
13 years, 4 months ago (2012年08月31日 02:10:24 UTC) #1 | |||||||||||||||
This was bugging me enough that I download mercurial and started to use it :) Hopefully I can figure out how to land it and merge it to the chromium branch successfully!
I'm getting ready for a trip. maruel should be able to help you. On Thu, Aug 30, 2012 at 7:10 PM, <john.abdelmalek@gmail.com> wrote: > Reviewers: GvR, > > Message: > This was bugging me enough that I download mercurial and started to use > it :) Hopefully I can figure out how to land it and merge it to the > chromium branch successfully! > > Description: > Fix reply by email for long subject lines. > > BUG=392 > > Please review this at https://codereview.appspot.com/6494063/ > > Affected files: > M codereview/views.py > > > Index: codereview/views.py > =================================================================== > --- a/codereview/views.py > +++ b/codereview/views.py > @@ -27,6 +27,7 @@ > import re > import urllib > from cStringIO import StringIO > +from email.header import decode_header > from xml.etree import ElementTree > > from google.appengine.api import mail > @@ -3908,6 +3909,9 @@ > raise InvalidIncomingEmailError('Mail sent by App Engine') > > subject = incoming_msg.subject or '' > + decoded_subject = decode_header(subject) > + if decoded_subject[0][1]: > + subject = decoded_subject[0][0].decode(decoded_subject[0][1]) > match = re.search(r'\(issue *(?P<id>\d+)\)$', subject) > if match is None: > raise InvalidIncomingEmailError('No issue id found: %s', subject) > > -- --Guido van Rossum (python.org/~guido)