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: nodejs#25582
Reviewed-By: Refael Ackermann <[email protected]>
  • Loading branch information
thefourtheye authored and danbev committed Jan 28, 2019
1 parent 26f80dc commit b31b84d
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 b31b84d

Please sign in to comment.