mirror of https://github.com/nodejs/node.git
tools: prepare ./tools/compress_json.py for Python 3
PR-URL: https://github.com/nodejs/node/pull/24889 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>pull/23683/head
parent
5906530834
commit
ad7ddfbca1
|
@ -5,6 +5,12 @@ import struct
|
|||
import sys
|
||||
import zlib
|
||||
|
||||
try:
|
||||
xrange # Python 2
|
||||
except NameError:
|
||||
xrange = range # Python 3
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
fp = open(sys.argv[1])
|
||||
obj = json.load(fp)
|
||||
|
|
Loading…
Reference in New Issue