changeset 39064: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 a5e70c14214a
children 713126389ef2
files hgext/patchbomb.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/patchbomb.py	Mon Jul 16 18:17:19 2018 -0400
+++ b/hgext/patchbomb.py	Mon Jul 16 18:17:44 2018 -0400
@@ -818,6 +818,8 @@
             generator = emailgen.Generator(_bytesgenerator(fp),
                                            mangle_from_=False)
             generator.flatten(m, 0)
-            sendmail(sender_addr, to + bcc + cc, fp.getvalue())
+            alldests = to + bcc + cc
+            alldests = [encoding.strfromlocal(d) for d in alldests]
+            sendmail(sender_addr, alldests, fp.getvalue())
 
     progress.complete()