Permalink
Browse files

tools: prepare ./tools/compress_json.py for Python 3

PR-URL: #24889
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
  • Loading branch information...
cclauss authored and Trott committed Dec 7, 2018
1 parent 5906530 commit ad7ddfbca1a07d743dfbfbfc6c2ca748c9e77cbe
Showing with 6 additions and 0 deletions.
  1. +6 −0 tools/compress_json.py
@@ -5,6 +5,12 @@
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)

0 comments on commit ad7ddfb

Please sign in to comment.