'Delete a task'

@api.response(200, model=base_message_schema, description=u'deleted    task')
@api.response(NotFoundError)
def delete(self, task, session=None):

    try:
        self.manager.config[u'tasks'].pop(task)
        self.manager.user_config[u'tasks'].pop(task)
    except KeyError:
        raise NotFoundError(u'task    does    not    exist')
    self.manager.save_config()
    self.manager.config_changed()
    return success_response(u'successfully    deleted    task')
