[PATCH v3 09/12] parsemail: Add cover letter parsing

Andy Doan andy.doan at linaro.org
Fri Apr 15 01:56:31 AEST 2016


On 04/11/2016 04:09 PM, Stephen Finucane wrote:
> Add support for both cover letters and comments on cover letters. This
> works using the following heuristics:
>
> * The message contains a '[0/n]' marker tag in the subject
> * The message is the root message
>
> Signed-off-by: Stephen Finucane <stephen.finucane at intel.com>

Reviewed-by: Andy Doan <andy.doan at linaro.org>

> diff --git a/patchwork/bin/parsemail.py b/patchwork/bin/parsemail.py
> @@ -462,7 +461,8 @@ def parse_mail(mail, list_id=None):
>
>       msgid = mail.get('Message-Id').strip()
>       author, save_required = find_author(mail)
> -    name, _ = clean_subject(mail.get('Subject'), [project.linkname])
> +    name, prefixes = clean_subject(mail.get('Subject'), [project.linkname])
> +    x, n = parse_series_marker(prefixes)
>       refs = find_references(mail)
>       date = find_date(mail)
>       headers = find_headers(mail)

small nitpick, but "n" is an unused variable.



More information about the Patchwork mailing list