[fix] urlencode
This commit is contained in:
@@ -7,7 +7,7 @@ import sys
|
|||||||
import tempfile
|
import tempfile
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from six.moves.urllib_parse import urljoin
|
from six.moves.urllib_parse import urljoin, urlencode
|
||||||
|
|
||||||
this_dir = os.path.realpath(os.path.dirname(__file__))
|
this_dir = os.path.realpath(os.path.dirname(__file__))
|
||||||
sys.path.append(os.path.realpath(os.path.join(os.pardir, os.pardir)))
|
sys.path.append(os.path.realpath(os.path.join(os.pardir, os.pardir)))
|
||||||
@@ -68,7 +68,7 @@ def openaddresses_download_configured_files(out_dir):
|
|||||||
for path in openaddresses_config.sources:
|
for path in openaddresses_config.sources:
|
||||||
source = six.b('/').join([safe_encode(p) for p in path])
|
source = six.b('/').join([safe_encode(p) for p in path])
|
||||||
zip_path = source + '.zip'
|
zip_path = source + '.zip'
|
||||||
url = urljoin(OPENADDRESSES_LATEST_DIR, zip_path)
|
url = urljoin(OPENADDRESSES_LATEST_DIR, urlencode(zip_path))
|
||||||
|
|
||||||
print(six.u('doing {}').format(safe_decode(source)))
|
print(six.u('doing {}').format(safe_decode(source)))
|
||||||
success = download_and_unzip_file(url, out_dir)
|
success = download_and_unzip_file(url, out_dir)
|
||||||
|
|||||||
Reference in New Issue
Block a user