Skip to content

Commit

Permalink
Merge pull request #2594 from robmoss2k/python3-streams-fix-au
Browse files Browse the repository at this point in the history
(python3-streams) Fix copyright reading logic and zip URL generation in python3-streams
  • Loading branch information
Windos authored Dec 22, 2024
2 parents fbc25bd + 8b7cb75 commit 9824ce1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions automatic/python3-streams/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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']
Expand Down

0 comments on commit 9824ce1

Please sign in to comment.