Permalink
Browse files

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>
  • Loading branch information...
thefourtheye authored and addaleax committed Jan 19, 2019
1 parent 30949f8 commit bc81a68f2039ec2337408a5bb18c557901d09fa9
Showing with 1 addition and 1 deletion.
  1. +1 −1 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')

0 comments on commit bc81a68

Please sign in to comment.