[blivet:master 06/11] Check for md_level of None
mulhern
amulhern at redhat.com
Thu Jul 3 15:19:45 UTC 2014
udev_device_get_md_level() does not raise a KeyError, it returns None.
Signed-off-by: mulhern <amulhern at 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
--
1.9.3
More information about the anaconda-patches
mailing list