comparison hgext/patchbomb.py @ 39027:8919cc4f63b4

patchbomb: python 3 really wants those email addresses in unicode At this point, test-patchbomb-tls.t almost passes on Python 3, but I'm not really sure what the issue is: we just get a `abort: Connection unexpectedly closed` that doesn't make sense to me. Differential Revision: https://phab.mercurial-scm.org/D3957
author Augie Fackler <augie@google.com>
date Mon, 16 Jul 2018 18:17:44 -0400
parents b95538a21613
children 8979626089bb
comparison
equal deleted inserted replaced
39026:a5e70c14214a 39027:8919cc4f63b4
816 del m['Bcc'] 816 del m['Bcc']
817 fp = stringio() 817 fp = stringio()
818 generator = emailgen.Generator(_bytesgenerator(fp), 818 generator = emailgen.Generator(_bytesgenerator(fp),
819 mangle_from_=False) 819 mangle_from_=False)
820 generator.flatten(m, 0) 820 generator.flatten(m, 0)
821 sendmail(sender_addr, to + bcc + cc, fp.getvalue()) 821 alldests = to + bcc + cc
822 alldests = [encoding.strfromlocal(d) for d in alldests]
823 sendmail(sender_addr, alldests, fp.getvalue())
822 824
823 progress.complete() 825 progress.complete()