summaryrefslogtreecommitdiff
path: root/domestic/shell/delete.py
diff options
context:
space:
mode:
authorAL-LCL <alvin@alvinhavel.com>2023-05-19 11:01:49 +0200
committerAL-LCL <alvin@alvinhavel.com>2023-05-19 11:01:49 +0200
commit20dbeb2f38684c65ff0a4b99012c161295708e88 (patch)
treea5b8445f55da2fbbb92443b68e9d7354a290c598 /domestic/shell/delete.py
NeoRATHEADmain
Diffstat (limited to 'domestic/shell/delete.py')
-rw-r--r--domestic/shell/delete.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/domestic/shell/delete.py b/domestic/shell/delete.py
new file mode 100644
index 0000000..16a3e98
--- /dev/null
+++ b/domestic/shell/delete.py
@@ -0,0 +1,13 @@
+from domestic.parse.error_exception_handling import *
+from domestic.utility.validate_dict_key import *
+from domestic.utility.delete_client import *
+
+
+@error_exception_handling
+def delete(message):
+ index = validate_dict_key(message, 'index')
+
+ if index:
+ delete_client(int(index))
+ else:
+ raise Exception('Error message') \ No newline at end of file