diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2015-12-16 19:10:07 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-12-16 19:10:07 -0500 |
commit | d266e76d96723bc4bea96f727efb63964a5e3800 (patch) | |
tree | 3b0ed05d6d8a3e9cbae84f9a1e6975b2b1707ff6 | |
parent | b3ce79e5da0f98c1df158e4a210ccfdee2881013 (diff) | |
download | python-setuptools-bitbucket-d266e76d96723bc4bea96f727efb63964a5e3800.tar.gz |
Explicitly quote strings rather than relying on repr. Fixes #477.
-rw-r--r-- | CHANGES.txt | 3 | ||||
-rw-r--r-- | ez_setup.py | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 3764d799..48fc18a9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,9 @@ CHANGES * Issue #476: Cast version to string (using default encoding) to avoid creating Unicode types on Python 2 clients. +* Issue #477: In Powershell downloader, use explicit rendering + of strings, rather than rely on ``repr``, which can be + incorrect (especially on Python 2). ---- 19.1 diff --git a/ez_setup.py b/ez_setup.py index 39ea44bc..16f707a6 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -225,7 +225,7 @@ def download_file_powershell(url, target): ps_cmd = ( "[System.Net.WebRequest]::DefaultWebProxy.Credentials = " "[System.Net.CredentialCache]::DefaultCredentials; " - "(new-object System.Net.WebClient).DownloadFile(%(url)r, %(target)r)" + '(new-object System.Net.WebClient).DownloadFile("%(url)s", "%(target)s")' % vars() ) cmd = [ |