BLD: Don't accept the download if we tried too many times

It's likely we have an incomplete file.
This commit is contained in:
Richard Frank
2016-04-20 15:45:18 -04:00
parent 9a59cd064b
commit baf10e3148
+2 -3
View File
@@ -33,12 +33,11 @@ function DownloadMiniconda ($python_version, $platform_suffix) {
Start-Sleep 1
}
}
if (Test-Path $filepath) {
Write-Host "File saved at" $filepath
} else {
if (!(Test-Path $filepath) -or ($i -ge $retry_attempts)) {
# Retry once to get the error message if any at the last try
$webclient.DownloadFile($url, $filepath)
}
Write-Host "File saved at" $filepath
return $filepath
}