Skip to content

Commit

Permalink
Merge pull request #706 from japokorn/3.0-devel-slave_name
Browse files Browse the repository at this point in the history
Fixed error message when slave is missing
  • Loading branch information
japokorn authored Jul 12, 2018
2 parents ed4098f + 78f4680 commit 6fa9abe
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions blivet/populator/populator.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,13 @@ def _add_slave_devices(self, info):
path = os.path.normpath("%s/%s" % (slave_dir, slave_name))
slave_info = udev.get_device(os.path.realpath(path))

if not slave_info:
msg = "unable to get udev info for %s" % slave_name
raise DeviceTreeError(msg)

# cciss in sysfs is "cciss!cXdYpZ" but we need "cciss/cXdYpZ"
slave_name = udev.device_get_name(slave_info).replace("!", "/")

if not slave_info:
log.warning("unable to get udev info for %s", slave_name)

slave_dev = self.get_device_by_name(slave_name)
if not slave_dev and slave_info:
# we haven't scanned the slave yet, so do it now
Expand Down

0 comments on commit 6fa9abe

Please sign in to comment.