From ee789cd92afd511b5f667aa01351d681c11a269b Mon Sep 17 00:00:00 2001 From: Markus Krogh Date: Mon, 17 Dec 2018 20:31:59 +0100 Subject: Fix python 3.5 problem with space in attachment name --- acp-storage-report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acp-storage-report.py b/acp-storage-report.py index 51d6faa..8b952d7 100644 --- a/acp-storage-report.py +++ b/acp-storage-report.py @@ -105,7 +105,7 @@ def send_email(customer, subject, body, report_name, report, config): msg.set_content(body) msg.make_mixed() - msg.add_attachment(report, filename=report_name) + msg.add_attachment(report, filename=report_name.replace(' ', '_')) with smtplib.SMTP(config[customer]['server'], config[customer]['port']) as server: server.send_message(msg) -- cgit v1.1