[blivet:master 2/7] Do not use udev info to get the name of the device.

mulhern amulhern at redhat.com
Tue Jun 24 17:04:23 UTC 2014


This name is only used in the warning, and device.name seems like a better
choice.

Signed-off-by: mulhern <amulhern at redhat.com>
---
 blivet/devicetree.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index 98f34f3..591583f 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -1572,8 +1572,6 @@ class DeviceTree(object):
 
     def handleUdevMDMemberFormat(self, info, device):
         log_method_call(self, name=device.name, type=device.format.type)
-        # either look up or create the array device
-        name = udev.udev_device_get_name(info)
 
         md_array = self.getDeviceByUuid(device.format.mdUuid, incomplete=True)
         if device.format.mdUuid and md_array:
@@ -1586,7 +1584,7 @@ class DeviceTree(object):
                 md_devices = int(udev.udev_device_get_md_devices(info))
                 md_uuid = udev.udev_device_get_md_uuid(info)
             except (KeyError, ValueError) as e:
-                log.warning("invalid data for %s: %s", name, e)
+                log.warning("invalid data for %s: %s", device.name, e)
                 return
 
             md_metadata = info.get("MD_METADATA")
-- 
1.9.3



More information about the anaconda-patches mailing list