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 MylesBorins committed May 16, 2019
1 parent 1c7f6a5 commit 99a653e
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 99a653e

Please sign in to comment.