Patchwork D2167: py3: cast character set to bytes

login
register
mail settings
Submitter phabricator
Date Feb. 13, 2018, 2:48 a.m.
Message ID <5e1a6f299408794a5626011116ec58e6@localhost.localdomain>
Download mbox | patch
Permalink /patch/27768/
State Not Applicable
Headers show

Comments

phabricator - Feb. 13, 2018, 2:48 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG6ea7f1c10c81: py3: cast character set to bytes (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2167?vs=5468&id=5590

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

AFFECTED FILES
  mercurial/mail.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/mail.py b/mercurial/mail.py
--- a/mercurial/mail.py
+++ b/mercurial/mail.py
@@ -187,7 +187,7 @@ 
 
 def codec2iana(cs):
     ''''''
-    cs = email.charset.Charset(cs).input_charset.lower()
+    cs = pycompat.sysbytes(email.charset.Charset(cs).input_charset.lower())
 
     # "latin1" normalizes to "iso8859-1", standard calls for "iso-8859-1"
     if cs.startswith("iso") and not cs.startswith("iso-"):