[PATCH] dim: Handle wrapped Message-Id lines

Jani Nikula jani.nikula at intel.com
Thu Sep 10 13:55:43 UTC 2020


On Thu, 10 Sep 2020, Steven Price <steven.price at arm.com> wrote:
> If a Message-Id is wrapped (by the email server or client) then white
> space can creep in at the beginning. This causes the generated 'Link:'
> tag to be broken. Fix it by stripping spaces as well as '<>'.
>
> Signed-off-by: Steven Price <steven.price at arm.com>
> ---
> This has already affected several commits e.g. 925896486522 ("video:
> fbdev: tgafb: Avoid comma separated statements").

Pushed, thanks.

Though I realized afterwards that the culprit is likely not in either
the server or the client, but rather the python package doing the header
parsing. It should remove the whitespace already. Maybe varies python
version to another.

The change makes sense regardless.

BR,
Jani.



> ---
>  dim | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/dim b/dim
> index e4f4d2e..ab89352 100755
> --- a/dim
> +++ b/dim
> @@ -432,7 +432,7 @@ from email.parser import Parser
>  headers = Parser().parse(open('$1', 'r'))
>  message_id = headers['message-id']
>  if message_id is not None:
> -    print(message_id.strip('<>'))
> +    print(message_id.strip('<> '))
>  EOF
>  }

-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the dim-tools mailing list