Resolves: rhbz#830756 --- pyanaconda/storage/udev.py | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pyanaconda/storage/udev.py b/pyanaconda/storage/udev.py index d5a08af..9b1e8da 100644 --- a/pyanaconda/storage/udev.py +++ b/pyanaconda/storage/udev.py @@ -581,9 +581,11 @@ def udev_device_get_iscsi_initiator(info): initiator = None if udev_device_is_partoff_iscsi(info): host = re.match('.*/(host\d+)', info["sysfs_path"]).groups()[0] - initiator = open("/sys/class/iscsi_host/%s/initiatorname" % - host).read().strip() - else: + if host: + initiator_file = "/sys/class/iscsi_host/%s/initiatorname" % host + if os.access(initiator_file, os.R_OK): + initiator = open(initiator_file).read().strip() + if initiator is None: session = udev_device_get_iscsi_session(info) if session: initiator = open("/sys/class/iscsi_session/%s/initiatorname" % -- 1.7.4 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list