Skip to content

Commit

Permalink
build: make compress_json python3 compatible
Browse files Browse the repository at this point in the history
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 28, 2019
1 parent 30949f8 commit bc81a68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/compress_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit bc81a68

Please sign in to comment.