Revision fc1dc9d7 lib/bdev.py

b/lib/bdev.py
1566 1566
  _PARSE_SHOW = None
1567 1567

  
1568 1568
  def __init__(self, unique_id, children):
1569
    if children and children.count(None) > 0:
1570
      children = []
1569 1571
    super(DRBD8, self).__init__(unique_id, children)
1570 1572
    self.major = self._DRBD_MAJOR
1571 1573
    [kmaj, kmin, kfix, api, proto] = self._GetVersion()
......
2030 2032
                                  "C")
2031 2033
        if res_r and self._MatchesNet(self._GetDevInfo(minor)):
2032 2034
          break
2035
      # the weakest case: we find something that is only net attached
2036
      # even though we were passed some children at init time
2037
      if match_r and "local_dev" not in info:
2038
        break
2033 2039
    else:
2034 2040
      minor = None
2035 2041

  
......
2066 2072

  
2067 2073
    minor = self._FindUnusedMinor()
2068 2074
    need_localdev_teardown = False
2069
    if self._children[0]:
2075
    if self._children and self._children[0] and self._children[1]:
2070 2076
      result = self._AssembleLocal(minor, self._children[0].dev_path,
2071 2077
                                   self._children[1].dev_path)
2072 2078
      if not result:

Also available in: Unified diff