summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Krogh <markus@nordu.net>2018-12-17 20:31:59 +0100
committerMarkus Krogh <markus@nordu.net>2018-12-17 20:31:59 +0100
commitee789cd92afd511b5f667aa01351d681c11a269b (patch)
tree27d9d989db3cead32f252122af4a152675f88790
parentd1f2def1ea81a6971f1c72353551ac459ab87138 (diff)
Fix python 3.5 problem with space in attachment nameHEADmaster
-rw-r--r--acp-storage-report.py2
1 files changed, 1 insertions, 1 deletions
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)