Patchwork [2,of,5] mail: remove redundant bytesurl() from addrlistencode()

login
register
mail settings
Submitter Yuya Nishihara
Date Aug. 12, 2018, 3:27 a.m.
Message ID <90759135ec282bc5f2b8.1534044439@mimosa>
Download mbox | patch
Permalink /patch/33687/
State Accepted
Headers show

Comments

Yuya Nishihara - Aug. 12, 2018, 3:27 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1534042894 -32400
#      Sun Aug 12 12:01:34 2018 +0900
# Node ID 90759135ec282bc5f2b847b2a4747cd452b2f4d9
# Parent  588e5275e29cdd37c49df8f1535ebd52042cd3d4
mail: remove redundant bytesurl() from addrlistencode()

_addressencode() returns a bytes.

Patch

diff --git a/mercurial/mail.py b/mercurial/mail.py
--- a/mercurial/mail.py
+++ b/mercurial/mail.py
@@ -348,7 +348,7 @@  def addrlistencode(ui, addrs, charsets=N
             [encoding.strfromlocal(a) for a in addrs]):
         if name or addr:
             result.append(_addressencode(ui, name, addr, charsets))
-    return [pycompat.bytesurl(r) for r in result]
+    return result
 
 def mimeencode(ui, s, charsets=None, display=False):
     '''creates mime text object, encodes it if needed, and sets