From patchwork Mon Oct 16 01:30:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D1100: wireproto: use listcomp instead of map() From: phabricator X-Patchwork-Id: 24959 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Mon, 16 Oct 2017 01:30:51 +0000 durin42 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The latter returns a generator object on Python 3, which breaks various parts of hg that expected a list. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D1100 AFFECTED FILES mercurial/wireproto.py CHANGE DETAILS To: durin42, #hg-reviewers Cc: mercurial-devel diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py --- a/mercurial/wireproto.py +++ b/mercurial/wireproto.py @@ -153,7 +153,7 @@ def decodelist(l, sep=' '): if l: - return map(bin, l.split(sep)) + return [bin(v) for v in l.split(sep)] return [] def encodelist(l, sep=' '):