Revision ecb091e3 lib/bdev.py

b/lib/bdev.py
1463 1463
      raise ValueError("Invalid configuration data %s" % str(unique_id))
1464 1464
    self.driver = unique_id[0]
1465 1465
    self.dev_path = unique_id[1]
1466
    self.Attach()
1466 1467

  
1467 1468
  def Assemble(self):
1468 1469
    """Assemble the device.
......
1525 1526
      boolean indicating if file exists or not.
1526 1527

  
1527 1528
    """
1528
    if os.path.exists(self.dev_path):
1529
      return True
1530
    return False
1529
    self.attached = os.path.exists(self.dev_path)
1530
    return self.attached
1531 1531

  
1532 1532
  @classmethod
1533 1533
  def Create(cls, unique_id, children, size):
......
1574 1574
  device = DEV_MAP[dev_type](unique_id, children)
1575 1575
  if not device.attached:
1576 1576
    return None
1577
  return  device
1577
  return device
1578 1578

  
1579 1579

  
1580 1580
def AttachOrAssemble(dev_type, unique_id, children):

Also available in: Unified diff