Skip to content

Commit

Permalink
Older cases must be handled differently
Browse files Browse the repository at this point in the history
  • Loading branch information
robmoss2k committed Dec 10, 2024
1 parent a52d497 commit b25db7f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion automatic/python3-streams/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ function global:au_SearchReplace {

function SetCopyright {
# download Python documentation archive
Add-Content -Path ".\log.txt" -Value "Downloading $($Latest.ZipUrl)"
$webrequest = [System.Net.HttpWebRequest]::Create($Latest.ZipUrl)
$response_stream = $webrequest.GetResponse().GetResponseStream()
$zip = [IO.Compression.ZipArchive]::new($response_stream)
Expand Down Expand Up @@ -140,7 +141,11 @@ function GetStreams() {
$version = Get-Version $latest_version

$urls = $all_versions[$latest_version]
$zip_name = "python-$versionTwoPart-docs-text"
if ($minor_version -le '12') {
$zip_name = "python-$latest_version-docs-text"
} else {
$zip_name = "python-$versionTwoPart-docs-text"
}
$zip_url = "https://docs.python.org/$versionTwoPart/archives/$zip_name.zip"
$license_url = "https://docs.python.org/$versionTwoPart/license.html"
$streams[$versionTwoPart] = @{
Expand Down

0 comments on commit b25db7f

Please sign in to comment.