From 90cd6cceb800f13d1cbca2274987cc070405cc32 Mon Sep 17 00:00:00 2001 From: Radek Vykydal Date: Wed, 8 Jan 2020 11:08:57 +0100 Subject: [PATCH] Do not crash on disk.wwn value being None (#1711571) --- pyanaconda/ui/gui/spokes/storage.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py index c43c5f73b495..d6635aac2290 100644 --- a/pyanaconda/ui/gui/spokes/storage.py +++ b/pyanaconda/ui/gui/spokes/storage.py @@ -667,8 +667,11 @@ def _add_disk_overview(self, disk, box): # We don't want to display the whole huge WWID for a multipath device. # That makes the DO way too wide. if isinstance(disk, MultipathDevice): - desc = disk.wwn - description = desc[0:6] + "..." + desc[-8:] + if not disk.wwn: + log.warning("Missing value of wwn attribute of MultipathDevice %s is unexpected." % disk.name) + description = "" + else: + description = disk.wwn[0:6] + "..." + disk.wwn[-8:] elif isinstance(disk, ZFCPDiskDevice): # manually mangle the desc of a zFCP device to be multi-line since # it's so long it makes the disk selection screen look odd