summaryrefslogtreecommitdiff
path: root/domestic/shell/delete.py
blob: 16a3e98ed6d644cf6b026a621d4f4a79f198d7b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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')