Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 16a75be

Browse filesBrowse files
cclaussBethGriggs
authored andcommitted
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>
1 parent b60808a commit 16a75be
Copy full SHA for 16a75be

File tree

Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed
Open diff view settings
Collapse file

‎tools/compress_json.py‎

Copy file name to clipboardExpand all lines: tools/compress_json.py
+6Lines changed: 6 additions & 0 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.