]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
patchtest-send-results: fix sender parsing
authorTrevor Gamblin <tgamblin@baylibre.com>
Thu, 2 Nov 2023 17:25:49 +0000 (13:25 -0400)
committerSteve Sakoman <steve@sakoman.com>
Mon, 20 Nov 2023 18:40:39 +0000 (08:40 -1000)
Not all mbox 'from' fields will contain angle brackets, so the
re.findall invocation used for getting a reply_address may fail. Use a
simpler reference to the field to get the sender's email address.

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 86e9afe09a346586114133f5a7470304d2ed733f)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
scripts/patchtest-send-results

index 1df81f943a1706b82e8eb552d80cdf504639d833..71b73f0940f03935835529715bc2cbf7eda6ec89 100755 (executable)
@@ -59,7 +59,7 @@ subject_line = f"Patchtest results for {mbox_subject}"
 
 # extract the submitter email address and use it as the reply address
 # for the results
-reply_address = re.findall("<(.*)>", mbox[0]['from'])[0]
+reply_address = mbox[0]['from']
 
 # extract the message ID and use that as the in-reply-to address
 in_reply_to = re.findall("<(.*)>", mbox[0]['Message-ID'])[0]