[PATCH] Fix iscsi udev info parsing (#811426)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 storage/udev.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/storage/udev.py b/storage/udev.py
index 7890c17..493c03e 100644
--- a/storage/udev.py
+++ b/storage/udev.py
@@ -554,7 +554,7 @@ def udev_device_get_iscsi_port(info):
     return path_components[address_field].split(":")[-1]
 
 def udev_device_get_iscsi_nic(info):
-    session = info["sysfs_path"].split("/")[4]
+    session = re.match('/.*/(session\d+)', info["sysfs_path"]).groups()[0]
     iface = open("/sys/class/iscsi_session/%s/ifacename" %
                  session).read().strip()
     return iface
-- 
1.7.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux