mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-14 00:21:08 +00:00
ubuntutools/requestsync/mail.py: Fix some more encoding issues.
This commit is contained in:
parent
1372671779
commit
24a8eae5c7
@ -180,11 +180,11 @@ def mailBug(srcpkg, subscribe, status, bugtitle, bugtext, keyid = None):
|
||||
|
||||
# sign the mail body
|
||||
gpg = subprocess.Popen(gpg_command, stdin = subprocess.PIPE, stdout = subprocess.PIPE)
|
||||
signed_report = gpg.communicate(mailbody.encode('utf-8'))[0]
|
||||
signed_report = gpg.communicate(mailbody.encode('utf-8'))[0].decode('utf-8')
|
||||
assert gpg.returncode == 0
|
||||
|
||||
# generate email
|
||||
mail = '''\
|
||||
mail = u'''\
|
||||
From: %s
|
||||
To: %s
|
||||
Subject: %s
|
||||
@ -223,6 +223,6 @@ Content-Type: text/plain; charset=UTF-8
|
||||
s.quit()
|
||||
return
|
||||
|
||||
s.sendmail(myemailaddr, to, mail)
|
||||
s.sendmail(myemailaddr, to, mail.encode('utf-8'))
|
||||
s.quit()
|
||||
print 'Sync request mailed.'
|
||||
|
Loading…
x
Reference in New Issue
Block a user