On Wed, 2015-02-25 at 10:52 -0500, Robert Marshall wrote:
Users reported an unhandled AttributeError NoneType while upgrading
from RHEL6.5 to RHEL6.6. Added a guard against the dev not existing
when looked up by name. NOTE: in both cases the fail was due to the
multipath device not being found - this will skip it but based on
comments on the code it should be ignored anyway and this guard
will ensure it doesn't crash the installer.
Resolves rhbz#1129499
---
booty/x86.py | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/booty/x86.py b/booty/x86.py
index 90540c5..8a1c20b 100644
--- a/booty/x86.py
+++ b/booty/x86.py
@@ -48,14 +48,19 @@ class x86BootloaderInfo(efiBootloaderInfo):
# physical disks ("hda"), and real partitions on physical disks
# ("hda1"). Anything else gets ignored.
dev = self.storage.devicetree.getDeviceByName(device)
- if dev.type == "mdarray":
- if dev.level != 1:
- log.error("x86BootloaderInfo.getPhysicalDevices ignoring non
"
- "level 1 raid array %s" % dev.name)
- return []
- devs = dev.parents
+ if dev:
+ devs = [dev]
+ # the above is what we normally want, but if it's mdarray then
let's
+ # do something different
Not a native speaker, but I'd say "#
the above is what we normally want
unless it's an mdarray" would be better here.
Other than the comment above this looks good to me.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic