Skip to content

Commit a383626

Browse files
cclaussBaochengSu
cclauss
authored andcommittedOct 9, 2020
tools: prepare ./tools/compress_json.py for Python 3
PR-URL: nodejs#24889 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> (cherry picked from commit ad7ddfb)
1 parent 7b56f61 commit a383626

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎tools/compress_json.py

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
import sys
66
import zlib
77

8+
try:
9+
xrange # Python 2
10+
except NameError:
11+
xrange = range # Python 3
12+
13+
814
if __name__ == '__main__':
915
fp = open(sys.argv[1])
1016
obj = json.load(fp)

0 commit comments

Comments
 (0)
Please sign in to comment.