mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-11 17:01:31 +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
|
# sign the mail body
|
||||||
gpg = subprocess.Popen(gpg_command, stdin = subprocess.PIPE, stdout = subprocess.PIPE)
|
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
|
assert gpg.returncode == 0
|
||||||
|
|
||||||
# generate email
|
# generate email
|
||||||
mail = '''\
|
mail = u'''\
|
||||||
From: %s
|
From: %s
|
||||||
To: %s
|
To: %s
|
||||||
Subject: %s
|
Subject: %s
|
||||||
@ -223,6 +223,6 @@ Content-Type: text/plain; charset=UTF-8
|
|||||||
s.quit()
|
s.quit()
|
||||||
return
|
return
|
||||||
|
|
||||||
s.sendmail(myemailaddr, to, mail)
|
s.sendmail(myemailaddr, to, mail.encode('utf-8'))
|
||||||
s.quit()
|
s.quit()
|
||||||
print 'Sync request mailed.'
|
print 'Sync request mailed.'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user