# HG changeset patch # User Yuya Nishihara # Date 1534043768 -32400 # Node ID d2d89d31cbb5874b9b10cc26e6765ec8ba493106 # Parent c2327bb3505dacb61918f819c659e5cda6a89336 mail: convert encoding.encoding to sysstr diff -r c2327bb3505d -r d2d89d31cbb5 mercurial/mail.py --- a/mercurial/mail.py Sun Aug 12 12:14:28 2018 +0900 +++ b/mercurial/mail.py Sun Aug 12 12:16:08 2018 +0900 @@ -313,7 +313,7 @@ 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)