Skip to content

Commit

Permalink
BLD: Don't accept the download if we tried too many times
Browse files Browse the repository at this point in the history
It's likely we have an incomplete file.
  • Loading branch information
richafrank committed Apr 21, 2016
1 parent 9a59cd0 commit baf10e3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ci/appveyor/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit baf10e3

Please sign in to comment.