Skip to content

Commit b31b84d

Browse files
thefourtheyedanbev
authored andcommitted
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: #25582 Reviewed-By: Refael Ackermann <refack@gmail.com>
1 parent 26f80dc commit b31b84d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/compress_json.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
step = 20
2626
slices = (data[i:i+step] for i in xrange(0, len(data), step))
27-
slices = map(lambda s: ','.join(str(ord(c)) for c in s), slices)
27+
slices = [','.join(str(ord(c)) for c in s) for s in slices]
2828
text = ',\n'.join(slices)
2929

3030
fp = open(sys.argv[2], 'w')

0 commit comments

Comments
 (0)