def check_job_lock(self, command_handler):
    'Check to see if we hold the job lock'
    return bool((self.command_handler_holding_job_lock == command_handler))
Check to see if we hold the job lock
def check_job_lock(self, command_handler):
    
    return bool((self.command_handler_holding_job_lock == command_handler))