mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-20 18:59:07 -05:00
fix: count the profiles the named listing shows
This commit is contained in:
1 parent
41e33032f7
commit
7577ec4c18
2 files changed
+27
-1
No files matched your search
@@ -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]}
|
||||
|
||||
|
||||
Reference in new issue
Block a user