pmb.core.arch: Handle unsupported arches in from_machine_type() better (MR 2498)

Closes https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/issues/2501
This commit is contained in:
Newbyte 2024-11-22 11:34:39 +01:00
parent 8012b3cefe
commit 0752a202aa
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
2 changed files with 6 additions and 0 deletions

View file

@ -61,6 +61,8 @@ class Arch(enum.Enum):
return Arch.armhf
case "armv7l" | "armv8l":
return Arch.armv7
case _:
raise ValueError(f"Unsupported machine type '{machine_type}'")
@staticmethod
def native() -> "Arch":