Revision fae737ac lib/jqueue.py

b/lib/jqueue.py
431 431
  def _GetArchivedJobPath(self, job_id):
432 432
    return os.path.join(constants.JOB_QUEUE_ARCHIVE_DIR, "job-%s" % job_id)
433 433

  
434
  def _ExtractJobID(self, name):
435
    m = self._RE_JOB_FILE.match(name)
436
    if m:
437
      return m.group(1)
438
    else:
439
      return None
440

  
434 441
  def _GetJobIDsUnlocked(self, archived=False):
435 442
    """Return all known job IDs.
436 443

  
......
442 449
    extra IDs).
443 450

  
444 451
    """
445
    jfiles = self._ListJobFiles()
446
    jlist = [m.group(1) for m in
447
             [self._RE_JOB_FILE.match(name) for name in jfiles]]
452
    jlist = [self._ExtractJobID(name) for name in self._ListJobFiles()]
448 453
    jlist.sort()
449 454
    return jlist
450 455

  

Also available in: Unified diff