[fix] urlencode

This commit is contained in:
Al
2016-09-07 13:48:39 -04:00
parent 62c8fa9048
commit 5c915855c9

View File

@@ -7,7 +7,7 @@ import sys
import tempfile
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__))
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:
source = six.b('/').join([safe_encode(p) for p in path])
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)))
success = download_and_unzip_file(url, out_dir)