go/rust bootstrap: no versions if unsupported arch (#40841)

The lookup in a dictionary causes KeyError on package load for
unsupported architectures such as i386 and ppc big endian.
This commit is contained in:
Harmen Stoppels 2023-11-02 15:13:13 +01:00 committed by GitHub
parent 80944d22f7
commit af3a29596e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -59,7 +59,7 @@ class GoBootstrap(Package):
# determine system os and architecture/target # determine system os and architecture/target
os = platform.system().lower() os = platform.system().lower()
target = go_targets[platform.machine().lower()] target = go_targets.get(platform.machine().lower(), platform.machine().lower())
# construct releases for current system configuration # construct releases for current system configuration
for release in go_releases: for release in go_releases:

View file

@ -73,7 +73,7 @@ class RustBootstrap(Package):
# Determine system os and architecture/target. # Determine system os and architecture/target.
os = platform.system().lower() os = platform.system().lower()
target = rust_targets[platform.machine().lower()] target = rust_targets.get(platform.machine().lower(), platform.machine().lower())
# Pre-release versions of the bootstrap compiler. # Pre-release versions of the bootstrap compiler.
# Note: These versions are unchecksumed since they will change # Note: These versions are unchecksumed since they will change