'Delete a command\'s session after a command has completed
or an error has occured.
Arguments:
session -- All stored data relevant to the current
command session.'

def terminate_command(self, session):

    sessionid = ('client:' + session['id'])
    try:
        del self.sessions[sessionid]
    except Exception as e:
        log.error(('Error    deleting    adhoc    command    session:    %s' % e.message))
