pmb.qemu.run: Use NonBugError for invalid device selection error

This eliminates all noise and results in an output that only contains
the actual relevant and helpful error message.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2603
This commit is contained in:
Newbyte 2025-05-21 14:01:08 +02:00 committed by Oliver Smith
parent 226eeed6ff
commit 0d672a7dc7
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -380,7 +380,7 @@ def run(args: PmbArgs) -> None:
config = get_context().config
device = config.device
if not device.startswith("qemu-"):
raise RuntimeError(
raise NonBugError(
"'pmbootstrap qemu' can be only used with one of "
"the QEMU device packages. Run 'pmbootstrap init' "
"and select the 'qemu' vendor."