'Returns a Job instance given a job tracker interface and an id. The job tracker interface is typically
located in request.jt.'

@staticmethod
def from_id(jt, jobid, is_finished=False):

    try:
        thriftjob = jt.get_job(jt.thriftjobid_from_string(jobid))
    except JobNotFoundException:
        try:
            thriftjob = jt.get_retired_job(jt.thriftjobid_from_string(jobid))
        except JobNotFoundException as e:
            raise PopupException((_('Could    not    find    job    with    id    %(jobid)s.') % {'jobid': jobid}), detail=e)
    return Job(jt, thriftjob)
