mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 08:26:56 +00:00
Nicer error message on unknown entry point
This commit is contained in:
parent
5eabd69659
commit
4b7600f3a5
1 changed files with 8 additions and 2 deletions
10
__main__.py
10
__main__.py
|
|
@ -80,8 +80,14 @@ def edit_config_file(args: List[str]) -> None:
|
|||
|
||||
|
||||
def namespaced(args: List[str]) -> None:
|
||||
func = namespaced_entry_points[args[1]]
|
||||
func(args[1:])
|
||||
try:
|
||||
func = namespaced_entry_points[args[1]]
|
||||
except KeyError:
|
||||
pass
|
||||
else:
|
||||
func(args[1:])
|
||||
return
|
||||
raise SystemExit(f'{args[1]} is not a known entry point. Choices are: ' + ', '.join(namespaced_entry_points))
|
||||
|
||||
|
||||
entry_points = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue