From b25db7fce80afdd6774d344502889eb7a53a0086 Mon Sep 17 00:00:00 2001 From: robmoss2k <15984835+robmoss2k@users.noreply.github.com> Date: Tue, 10 Dec 2024 17:03:29 +0000 Subject: [PATCH] Older cases must be handled differently --- automatic/python3-streams/update.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/automatic/python3-streams/update.ps1 b/automatic/python3-streams/update.ps1 index e368f4999cf..cd0c2ad4ba1 100644 --- a/automatic/python3-streams/update.ps1 +++ b/automatic/python3-streams/update.ps1 @@ -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) @@ -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] = @{