...
This commit is contained in:
parent
3cc9750af8
commit
4e3f643cf5
1 changed files with 4 additions and 6 deletions
|
|
@ -12,12 +12,10 @@
|
|||
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 @@ def response_from_kitty(self, boss: Boss, window: Optional[Window], payload_get:
|
|||
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…
Reference in a new issue