From d266e76d96723bc4bea96f727efb63964a5e3800 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 16 Dec 2015 19:10:07 -0500 Subject: Explicitly quote strings rather than relying on repr. Fixes #477. --- CHANGES.txt | 3 +++ ez_setup.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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 = [ -- cgit v1.2.1