Revision c33549ef lib/jstore.py

b/lib/jstore.py
21 21

  
22 22
"""Module implementing the job queue handling."""
23 23

  
24
import os
25 24
import errno
26 25

  
27 26
from ganeti import constants
......
79 78
           locking mode.
80 79

  
81 80
  """
82
  # Make sure our directories exists
83
  for path in (constants.QUEUE_DIR, constants.JOB_QUEUE_ARCHIVE_DIR):
84
    try:
85
      os.mkdir(path, 0700)
86
    except OSError, err:
87
      if err.errno not in (errno.EEXIST, ):
88
        raise
81
  dirs = [(d, constants.JOB_QUEUE_DIRS_MODE) for d in constants.JOB_QUEUE_DIRS]
82
  utils.EnsureDirs(dirs)
89 83

  
90 84
  # Lock queue
91 85
  queue_lock = utils.FileLock.Open(constants.JOB_QUEUE_LOCK_FILE)

Also available in: Unified diff