summaryrefslogtreecommitdiffstats
path: root/Mac/BuildScript
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-06-23 11:44:14 (GMT)
committerGeorg Brandl <georg@python.org>2008-06-23 11:44:14 (GMT)
commit029986af249f71a5603110a0f5f0b18d0f335828 (patch)
tree90fafdd902e370d05952d900b7270043ad4c0053 /Mac/BuildScript
parent0f7ede45693be57ba51c7aa23a0d841f160de874 (diff)
downloadcpython-029986af249f71a5603110a0f5f0b18d0f335828.zip
cpython-029986af249f71a5603110a0f5f0b18d0f335828.tar.gz
cpython-029986af249f71a5603110a0f5f0b18d0f335828.tar.bz2
Fix old urllib/urllib2/urlparse usage.
Diffstat (limited to 'Mac/BuildScript')
-rwxr-xr-xMac/BuildScript/build-installer.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py
index 8e359ba..6156072 100755
--- a/Mac/BuildScript/build-installer.py
+++ b/Mac/BuildScript/build-installer.py
@@ -9,7 +9,8 @@ bootstrap issues (/usr/bin/python is Python 2.3 on OSX 10.4)
Usage: see USAGE variable in the script.
"""
-import platform, os, sys, getopt, textwrap, shutil, urllib2, stat, time, pwd
+import platform, os, sys, getopt, textwrap, shutil, stat, time, pwd
+import urllib.request
import grp
INCLUDE_TIMESTAMP = 1
@@ -442,7 +443,7 @@ def downloadURL(url, fname):
if KNOWNSIZES.get(url) == size:
print("Using existing file for", url)
return
- fpIn = urllib2.urlopen(url)
+ fpIn = urllib.request.urlopen(url)
fpOut = open(fname, 'wb')
block = fpIn.read(10240)
try: