summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2018-06-11 22:26:02 +0300
committerLars Wirzenius <liw@liw.fi>2018-06-11 22:26:02 +0300
commit126ecbb29bfbc923859c7e66a6cbdc91d25dfbfc (patch)
tree1cd5657b42bd38bdd6f7f9df569bc2bbd04cd662
parentc710ff236b9db15e2073640992a5a72bd9f6b9fb (diff)
downloadick2-126ecbb29bfbc923859c7e66a6cbdc91d25dfbfc.tar.gz
Fix: handle non-ASCII build logs in notification mails
-rw-r--r--ick2/sendmail.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ick2/sendmail.py b/ick2/sendmail.py
index 0b0d34e..423b9f6 100644
--- a/ick2/sendmail.py
+++ b/ick2/sendmail.py
@@ -85,8 +85,8 @@ class Sendmail:
def get_log(self, log):
msg = email.message.Message()
- msg.set_payload(log)
- msg.add_header('Content-Type', 'text/plain')
+ msg.set_payload(log.encode('utf-8'))
+ msg.add_header('Content-Type', 'text/plain; charset=utf-8')
msg.add_header(
'Content-Disposition', 'inline', filename='build.log')
return msg