# HG changeset patch
# User Yuya Nishihara <y...@tcha.org>
# Date 1534043768 -32400
#      Sun Aug 12 12:16:08 2018 +0900
# Node ID 1c137e0a33afe4d7e61325513d2518af8b93434a
# Parent  a160d88772ff1da51160faa5cfdbd7ecdbcd07fa
mail: convert encoding.encoding to sysstr

diff --git a/mercurial/mail.py b/mercurial/mail.py
--- a/mercurial/mail.py
+++ b/mercurial/mail.py
@@ -313,7 +313,7 @@ def _addressencode(ui, name, addr, chars
     try:
         acc, dom = addr.split('@')
         acc.decode('ascii')
-        dom = dom.decode(encoding.encoding).encode('idna')
+        dom = dom.decode(pycompat.sysstr(encoding.encoding)).encode('idna')
         addr = '%s@%s' % (acc, dom)
     except UnicodeDecodeError:
         raise error.Abort(_('invalid email address: %s') % addr)
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to