diff options
author | David Lehman <dlehman@redhat.com> | 2009-03-05 10:39:54 -0600 |
---|---|---|
committer | David Lehman <dlehman@redhat.com> | 2009-03-05 10:39:54 -0600 |
commit | 655419771822f9bb32f227957c6a3f1bed036ce2 (patch) | |
tree | 2e4f97c18b19117946fcb978726ceef119aa578e /storage | |
parent | 755478fcb2fd9ee5d65f907199ade7359f90f6a1 (diff) | |
download | anaconda-655419771822f9bb32f227957c6a3f1bed036ce2.tar.gz anaconda-655419771822f9bb32f227957c6a3f1bed036ce2.tar.xz anaconda-655419771822f9bb32f227957c6a3f1bed036ce2.zip |
Handle non-fatal errors more gracefully in addUdevDevice.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/devicetree.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/storage/devicetree.py b/storage/devicetree.py index c165eebcc..3494d5a1d 100644 --- a/storage/devicetree.py +++ b/storage/devicetree.py @@ -819,7 +819,10 @@ class DeviceTree(object): kwargs["mapName"] = "luks-%s" % uuid elif format_type == "linux_raid_member": # mdraid - kwargs["mdUuid"] = udev_device_get_md_uuid(info) + try: + kwargs["mdUuid"] = udev_device_get_md_uuid(info) + except KeyError: + log.debug("mdraid member %s has no md uuid" % name) elif format_type == "isw_raid_member": # dmraid # TODO: collect name of containing raidset @@ -831,8 +834,14 @@ class DeviceTree(object): kwargs["vgName"] = udev_device_get_vg_name(info) except KeyError as e: log.debug("PV %s has no vg_name" % name) - kwargs["vgUuid"] = udev_device_get_vg_uuid(info) - kwargs["peStart"] = udev_device_get_pv_pe_start(info) + try: + kwargs["vgUuid"] = udev_device_get_vg_uuid(info) + except KeyError: + log.debug("PV %s has no vg_uuid" % name) + try: + kwargs["peStart"] = udev_device_get_pv_pe_start(info) + except KeyError: + log.debug("PV %s has no pe_start" % name) format = formats.getFormat(*args, **kwargs) device.format = format |