correctly use urllib in python3
This commit is contained in:
parent
3edaed53aa
commit
9d715e95b7
1 changed files with 4 additions and 1 deletions
|
@ -301,7 +301,10 @@ def install_python():
|
||||||
if platform.architecture()[0] == '64bit':
|
if platform.architecture()[0] == '64bit':
|
||||||
url = 'https://www.python.org/ftp/python/3.4.3/python-3.4.3.amd64.msi'
|
url = 'https://www.python.org/ftp/python/3.4.3/python-3.4.3.amd64.msi'
|
||||||
python_msi = os.path.join(os.path.expanduser('~'), 'python.msi')
|
python_msi = os.path.join(os.path.expanduser('~'), 'python.msi')
|
||||||
urllib.urlretrieve(url, python_msi)
|
try:
|
||||||
|
urllib.urlretrieve(url, python_msi)
|
||||||
|
except AttributeError:
|
||||||
|
urllib.request.urlretrieve(url, python_msi)
|
||||||
args = [
|
args = [
|
||||||
'msiexec',
|
'msiexec',
|
||||||
'/i',
|
'/i',
|
||||||
|
|
Loading…
Reference in a new issue