From f061d4239b21c0fbf238b1c5a644b7cbcc02deec Mon Sep 17 00:00:00 2001 From: Al Date: Wed, 7 Sep 2016 13:51:08 -0400 Subject: [PATCH] [fix] quote, not urlencode --- scripts/geodata/openaddresses/download_openaddresses.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/geodata/openaddresses/download_openaddresses.py b/scripts/geodata/openaddresses/download_openaddresses.py index c460619a..f02965fa 100644 --- a/scripts/geodata/openaddresses/download_openaddresses.py +++ b/scripts/geodata/openaddresses/download_openaddresses.py @@ -7,7 +7,7 @@ import sys import tempfile import yaml -from six.moves.urllib_parse import urljoin, urlencode +from six.moves.urllib_parse import urljoin, quote_plus 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, urlencode(zip_path)) + url = urljoin(OPENADDRESSES_LATEST_DIR, quote_plus(zip_path)) print(six.u('doing {}').format(safe_decode(source))) success = download_and_unzip_file(url, out_dir)