summaryrefslogtreecommitdiff
path: root/domestic/shell/delete.py
diff options
context:
space:
mode:
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