fix: count the profiles the named listing shows

This commit is contained in:
Abdessamad Derraz committed 2026-10-19 04:30:38 +02:00
1 parent 41e33032f7
commit 7577ec4c18
2 files changed
+27 -1

No files matched your search

+7 -1
View File
@@ -3304,9 +3304,15 @@ def select_profiles(profiles: dict, args: argparse.Namespace) -> dict:
"""Profiles matching the selection flags."""
if args.emulator:
if args.emulator not in profiles:
# Suggested from what the listing it names shows: counted over the
# alias and test profiles too, "lists all 553" pointed at 530 lines.
listed = sorted(
name for name, profile in profiles.items()
if profile.get("type") not in ("alias", "test")
)
raise SystemExit(
f"ERROR: unknown profile {args.emulator}. "
+ suggest_names([args.emulator], sorted(profiles), "verify.py --list-emulators")
+ suggest_names([args.emulator], listed, "verify.py --list-emulators")
)
return {args.emulator: profiles[args.emulator]}