changeset 36466:4223bef1489c

py3: convert a map expression into list comprehension map returns a map object on Python 3 and here we wanted a list instead. Differential Revision: https://phab.mercurial-scm.org/D2456
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 26 Feb 2018 18:00:29 +0530
parents f449138a52df
children 745b0df08514
files mercurial/crecord.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/crecord.py	Mon Feb 26 16:22:15 2018 +0530
+++ b/mercurial/crecord.py	Mon Feb 26 18:00:29 2018 +0530
@@ -547,7 +547,7 @@
     chunkselector = curseschunkselector(headerlist, ui, operation)
     if testfn and os.path.exists(testfn):
         testf = open(testfn)
-        testcommands = map(lambda x: x.rstrip('\n'), testf.readlines())
+        testcommands = [x.rstrip('\n') for x in testf.readlines()]
         testf.close()
         while True:
             if chunkselector.handlekeypressed(testcommands.pop(0), test=True):