mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-25 10:27:24 +00:00
...
This commit is contained in:
parent
3cc9750af8
commit
4e3f643cf5
1 changed files with 4 additions and 6 deletions
|
|
@ -12,12 +12,10 @@ from .base import (
|
|||
PayloadType,
|
||||
RCOptions,
|
||||
RemoteCommand,
|
||||
RemoteControlErrorWithoutTraceback,
|
||||
ResponseType,
|
||||
Window,
|
||||
)
|
||||
from .base import (
|
||||
RemoteControlErrorWithoutTraceback as RemoteControlError,
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from kitty.cli_stub import ActionRCOptions as CLIOptions
|
||||
|
|
@ -65,15 +63,15 @@ using this option means that you will not be notified of failures.
|
|||
window = w[0]
|
||||
ac = payload_get('action')
|
||||
if not ac:
|
||||
raise RemoteControlError('Must specify an action')
|
||||
raise RemoteControlErrorWithoutTraceback('Must specify an action')
|
||||
|
||||
try:
|
||||
consumed = boss.combine(str(ac), window, raise_error=True)
|
||||
except (Exception, SystemExit) as e:
|
||||
raise RemoteControlError(str(e))
|
||||
raise RemoteControlErrorWithoutTraceback(str(e))
|
||||
|
||||
if not consumed:
|
||||
raise RemoteControlError(f'Unknown action: {ac}')
|
||||
raise RemoteControlErrorWithoutTraceback(f'Unknown action: {ac}')
|
||||
return None
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue