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: https://github.com/nodejs/node/pull/25582 Reviewed-By: Refael Ackermann <refack@gmail.com>
This commit is contained in:
parent
26f80dcddd
commit
b31b84d312
@ -24,7 +24,7 @@ if __name__ == '__main__':
|
||||
|
||||
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')
|
||||
|
Loading…
x
Reference in New Issue
Block a user