udev_device_get_md_level() does not raise a KeyError, it returns None.
Signed-off-by: mulhern amulhern@redhat.com --- blivet/devicetree.py | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/blivet/devicetree.py b/blivet/devicetree.py index 669e4bf..57e0a47 100644 --- a/blivet/devicetree.py +++ b/blivet/devicetree.py @@ -1578,6 +1578,10 @@ class DeviceTree(object): log.warning("invalid data for %s: %s", device.name, e) return
+ if md_level is None: + log.warning("invalid data for %s: no RAID level", device.name) + return + md_metadata = info.get("MD_METADATA") md_name = None