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:
		| @@ -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: | ||||||
|   | |||||||
| @@ -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 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Harmen Stoppels
					Harmen Stoppels