Revision 5e09a309 lib/bdev.py

b/lib/bdev.py
2245 2245
      raise ValueError("Invalid configuration data %s" % str(unique_id))
2246 2246
    self.driver = unique_id[0]
2247 2247
    self.dev_path = unique_id[1]
2248

  
2249
    CheckFileStoragePath(self.dev_path)
2250

  
2248 2251
    self.Attach()
2249 2252

  
2250 2253
  def Assemble(self):
......
2361 2364
    """
2362 2365
    if not isinstance(unique_id, (tuple, list)) or len(unique_id) != 2:
2363 2366
      raise ValueError("Invalid configuration data %s" % str(unique_id))
2367

  
2364 2368
    dev_path = unique_id[1]
2369

  
2370
    CheckFileStoragePath(dev_path)
2371

  
2365 2372
    try:
2366 2373
      fd = os.open(dev_path, os.O_RDWR | os.O_CREAT | os.O_EXCL)
2367 2374
      f = os.fdopen(fd, "w")

Also available in: Unified diff