D2149: py3: pass system string to email.message.Message.set_type()

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Sun Feb 11 20:40:23 EST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG1407c42b302c: py3: pass system string to email.message.Message.set_type() (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2149?vs=5434&id=5448

REVISION DETAIL
  https://phab.mercurial-scm.org/D2149

AFFECTED FILES
  mercurial/mail.py

CHANGE DETAILS

diff --git a/mercurial/mail.py b/mercurial/mail.py
--- a/mercurial/mail.py
+++ b/mercurial/mail.py
@@ -20,6 +20,7 @@
 from . import (
     encoding,
     error,
+    pycompat,
     sslutil,
     util,
 )
@@ -218,7 +219,7 @@
     '''
     cs = email.charset.Charset(charset)
     msg = email.message.Message()
-    msg.set_type('text/' + subtype)
+    msg.set_type(pycompat.sysstr('text/' + subtype))
 
     for line in body.splitlines():
         if len(line) > 950:



To: indygreg, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list