diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2014-05-07 12:15:13 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2014-05-07 12:15:13 -0400 |
| commit | fd8f6d7b535a0959843c9ef7aa16c0f7d6a5b187 (patch) | |
| tree | bf33a17e1b26b9c4909af4c99c667aa8c992a156 /ez_setup.py | |
| parent | 7aa77d048db1823bddca02a5ff503b54c3d1a3e7 (diff) | |
| download | python-setuptools-bitbucket-fd8f6d7b535a0959843c9ef7aa16c0f7d6a5b187.tar.gz | |
Extract powershell command to correct long line
Diffstat (limited to 'ez_setup.py')
| -rw-r--r-- | ez_setup.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ez_setup.py b/ez_setup.py index 7ec1680a..003e0619 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -166,10 +166,16 @@ def download_file_powershell(url, target): trust). Raise an exception if the command cannot complete. """ target = os.path.abspath(target) + ps_cmd = ( + "[System.Net.WebRequest]::DefaultWebProxy.Credentials = " + "[System.Net.CredentialCache]::DefaultCredentials; " + "(new-object System.Net.WebClient).DownloadFile(%(url)r, %(target)r)" + % vars() + ) cmd = [ 'powershell', '-Command', - "[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials; (new-object System.Net.WebClient).DownloadFile(%(url)r, %(target)r)" % vars(), + ps_cmd, ] _clean_check(cmd, target) |
