changeset 36450:d478c8cd89d1

py3: convert bytes to str using encoding.strfromlocal using encoding.strfromlocal because sender is provided from user config or argument. Differential Revision: https://phab.mercurial-scm.org/D2460
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 26 Feb 2018 23:54:40 +0530
parents a918c996a881
children 1fa35ca345a5
files hgext/patchbomb.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/patchbomb.py	Mon Feb 26 23:50:30 2018 +0530
+++ b/hgext/patchbomb.py	Mon Feb 26 23:54:40 2018 +0530
@@ -748,7 +748,7 @@
         if not parent.endswith('>'):
             parent += '>'
 
-    sender_addr = eutil.parseaddr(sender)[1]
+    sender_addr = eutil.parseaddr(encoding.strfromlocal(sender))[1]
     sender = mail.addressencode(ui, sender, _charsets, opts.get('test'))
     sendmail = None
     firstpatch = None