aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@amd.com>2023-10-19 12:16:32 -0500
committerMario Limonciello <mario.limonciello@amd.com>2023-10-19 12:16:32 -0500
commit6ed754659e1540f0df58f0b4272f78f39f731a14 (patch)
treea9c479fbfaf66851cf99667282a11ea49448a883
parent29e9aa8686d56a6b307f6a8a1e3bd9a383060003 (diff)
downloadlinux-firmware-6ed754659e1540f0df58f0b4272f78f39f731a14.tar.gz
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>
-rwxr-xr-xcontrib/process_linux_firmware.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/process_linux_firmware.py b/contrib/process_linux_firmware.py
index 4ef0aa76..2b7c7f8d 100755
--- a/contrib/process_linux_firmware.py
+++ b/contrib/process_linux_firmware.py
@@ -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"])