def ParseJobId(job_id):
  try:
    return int(job_id)
  except (ValueError, TypeError):
    raise errors.ParameterError("Invalid job ID '%s'" % job_id)
Parses a job ID and converts it to integer.
dataset/ETHPy150Open ganeti/ganeti/lib/jstore.py/ParseJobId