diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2023-02-07 01:26:41 +0100 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2023-02-07 01:26:41 +0100 |
commit | c2109e5561299b2a120d1a669d58f6147ca40fb1 (patch) | |
tree | 1d8193f8765498bfbd209a4bfb228559cd994294 /command.py | |
download | automato-c2109e5561299b2a120d1a669d58f6147ca40fb1.tar.gz |
first commit
Diffstat (limited to 'command.py')
-rw-r--r-- | command.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/command.py b/command.py new file mode 100644 index 0000000..db0d261 --- /dev/null +++ b/command.py @@ -0,0 +1,15 @@ +import transport + +class Command: + def __init__(self, transport: transport.Transport): + raise NotImplemented + + def execute(self, **kwargs): + raise NotImplemented + +class NotifyCommand(Command): + def __init__(self, transport: transport.SshTransport): + self._transport = transport + + def execute(self, msg: str, **kwargs): + self._transport.execHandleStderror(f'notify-send "{msg}"') |