aboutsummaryrefslogtreecommitdiff
path: root/command.py
diff options
context:
space:
mode:
Diffstat (limited to 'command.py')
-rw-r--r--command.py15
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}"')