Commit aae75a3d authored by Jason R. Coombs's avatar Jason R. Coombs

Move import to the top

parent 02abac66
......@@ -26,6 +26,11 @@ import contextlib
from distutils import log
try:
from urllib.request import urlopen
except ImportError:
from urllib2 import urlopen
try:
from site import USER_SITE
except ImportError:
......@@ -227,10 +232,6 @@ def download_file_insecure(url, target):
Use Python to download the file, even though it cannot authenticate the
connection.
"""
try:
from urllib.request import urlopen
except ImportError:
from urllib2 import urlopen
src = urlopen(url)
try:
# Read all the data in one block.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment