summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2009-03-05 10:39:54 -0600
committerDavid Lehman <dlehman@redhat.com>2009-03-05 10:39:54 -0600
commit655419771822f9bb32f227957c6a3f1bed036ce2 (patch)
tree2e4f97c18b19117946fcb978726ceef119aa578e /storage
parent755478fcb2fd9ee5d65f907199ade7359f90f6a1 (diff)
downloadanaconda-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.py15
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