From c9586ad6400287d6ae4394efc35b0ecf99b83671 Mon Sep 17 00:00:00 2001 From: "Sakthipriyan Vairamani (thefourtheye)" Date: Sat, 19 Jan 2019 15:25:08 +0530 Subject: [PATCH] build: make compress_json python3 compatible This patch replaces a usage of `map` with list comprehension, which makes the script Python 3 compatiable. PR-URL: https://github.com/nodejs/node/pull/25582 Reviewed-By: Refael Ackermann (cherry picked from commit b31b84d312c90af2157e3b61d1a3ba3c0d7925e3) --- tools/compress_json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/compress_json.py b/tools/compress_json.py index b52c5d7a252cf6..e48a3f2c3cb7cc 100644 --- a/tools/compress_json.py +++ b/tools/compress_json.py @@ -24,7 +24,7 @@ step = 20 slices = (data[i:i+step] for i in xrange(0, len(data), step)) - slices = map(lambda s: ','.join(str(ord(c)) for c in s), slices) + slices = [','.join(str(ord(c)) for c in s) for s in slices] text = ',\n'.join(slices) fp = open(sys.argv[2], 'w')