Keep py3.X compatibility for urllib
Change-Id: I0583071421f2b0a7fb79ea0dbfde52b2c7cb20e0 Partial-Bug:#1280105
This commit is contained in:
parent
f39e074120
commit
30f38e8dfd
@ -26,7 +26,8 @@
|
||||
import ConfigParser
|
||||
import os
|
||||
import tarfile
|
||||
import urllib2
|
||||
|
||||
from six.moves.urllib import request as urlreq
|
||||
|
||||
# Default client libs
|
||||
import glanceclient as glance_client
|
||||
@ -296,7 +297,7 @@ def download_and_register_uec_images(image_client, download_url,
|
||||
basename = os.path.basename(download_url)
|
||||
path = os.path.join(download_folder, basename)
|
||||
|
||||
request = urllib2.urlopen(download_url)
|
||||
request = urlreq.urlopen(download_url)
|
||||
|
||||
# First, download the file
|
||||
with open(path, "wb") as fp:
|
||||
|
@ -4,3 +4,4 @@ python-subunit>=0.0.18
|
||||
pycrypto>=2.6.1
|
||||
requests>=2.5.2
|
||||
PyYAML>=3.1.0
|
||||
six>=1.9.0
|
||||
|
Loading…
Reference in New Issue
Block a user