diff --git a/automatic/python3-streams/update.ps1 b/automatic/python3-streams/update.ps1 index 715ae807394..3f43341dca5 100644 --- a/automatic/python3-streams/update.ps1 +++ b/automatic/python3-streams/update.ps1 @@ -54,7 +54,7 @@ function SetCopyright { (1..5) | ForEach-Object {$reader.ReadLine()} # skip header $copyright = '' $reading_copyright = $false - while (($line = $reader.ReadLine()) -ne $null) { + while ($null -ne ($line = $reader.ReadLine())) { if (!$line) { $copyright += "`n" $reading_copyright = $false @@ -140,12 +140,12 @@ function GetStreams() { $version = Get-Version $latest_version $urls = $all_versions[$latest_version] - $zip_name = "python-$latest_version-docs-text" - if ($version.Prerelease -eq "" -or $version.Prerelease.StartsWith("rc")) { - $zip_url = "https://www.python.org/ftp/python/doc/$latest_version/$zip_name.zip" + if ($minor_version -le '11') { + $zip_name = "python-$latest_version-docs-text" } else { - $zip_url = "https://docs.python.org/$versionTwoPart/archives/$zip_name.zip" + $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] = @{ URL32 = $urls['86']