[PATCH 4/5] Not all udev info blocks return a name, so provide a way to ignore it.

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

 



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

diff --git a/storage/udev.py b/storage/udev.py
index 24b86be..051dc21 100644
--- a/storage/udev.py
+++ b/storage/udev.py
@@ -100,7 +100,7 @@ def enumerate_block_devices():
         devices.append(sysfs_path)
     return devices
 
-def udev_get_block_device(sysfs_path):
+def udev_get_block_device(sysfs_path, requireName=True):
     if not os.path.exists(sysfs_path):
         log.debug("%s does not exist" % sysfs_path)
         return None
@@ -114,7 +114,7 @@ def udev_get_block_device(sysfs_path):
 
     entry = open(db_path).read()
     dev = udev_parse_block_entry(entry)
-    if dev.has_key("name"):
+    if requireName and dev.has_key("name"):
         # XXX why do we do this? is /sys going to move during installation?
         dev['sysfs_path'] = sysfs_path[4:]  # strip off the leading '/sys'
         dev = udev_parse_uevent_file(dev)
-- 
1.6.1.3

_______________________________________________
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