'Returns the state of a single job, used to make sure a job is
really dead.'

def check_single_job(self, pbs_server_name, job_id):

    c = pbs.pbs_connect(util.smart_str(pbs_server_name))
    if (c <= 0):
        log.debug(('connection    to    PBS    server    %s    for    state    check    failed' % pbs_server_name))
        return None
    stat_attrl = pbs.new_attrl(1)
    stat_attrl[0].name = pbs.ATTR_state
    jobs = pbs.pbs_statjob(c, job_id, stat_attrl, None)
    pbs.pbs_disconnect(c)
    return jobs[0].attribs[0].value
