8000 FIX make list_versions.py Python 2 compatible · scikit-learn/scikit-learn@3e29334 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3e29334

Browse files
committed
FIX make list_versions.py Python 2 compatible
1 parent 01476b9 commit 3e29334

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

build_tools/circle/list_versions.py

100644100755
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
#!/usr/bin/env python3
22

33
# List all available versions of the documentation
4+
from __future__ import print_function
45

5-
from urllib.request import urlopen
66
import json
77
import re
88
import sys
99

10+
try:
11+
from urllib.request import urlopen
12+
except ImportError:
13+
# Python 2
14+
from urllib import urlopen
15+
1016
from distutils.version import LooseVersion
1117

1218

0 commit comments

Comments
 (0)
0