mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
synced 2024-12-17 20:55:27 +00:00
Fix the robot email script
``` Traceback (most recent call last): File "~/linux-firmware-robot/./contrib/process_linux_firmware.py", line 339, in <module> process_database(conn, remote) File "~/linux-firmware-robot/./contrib/process_linux_firmware.py", line 276, in process_database reply_email(mbox, branch) File "~/linux-firmware-robot/./contrib/process_linux_firmware.py", line 86, in reply_email reply["To"] += email.utils.formataddr(target) TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str' ``` Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
This commit is contained in:
parent
29e9aa8686
commit
6ed754659e
@ -79,11 +79,12 @@ def reply_email(content, branch):
|
||||
reply = email.message.EmailMessage()
|
||||
|
||||
orig = email.message_from_string(content)
|
||||
targets = email.utils.getaddresses(
|
||||
orig.get_all("to", []) + orig.get_all("cc", []) + orig.get_all("from", [])
|
||||
reply["To"] = ", ".join(
|
||||
email.utils.formataddr(t)
|
||||
for t in email.utils.getaddresses(
|
||||
orig.get_all("from", []) + orig.get_all("to", []) + orig.get_all("cc", [])
|
||||
)
|
||||
)
|
||||
for target in targets:
|
||||
reply["To"] += email.utils.formataddr(target)
|
||||
|
||||
reply["From"] = "linux-firmware@kernel.org"
|
||||
reply["Subject"] = "Re: {}".format(orig["Subject"])
|
||||
|
Loading…
Reference in New Issue
Block a user