Skip to content

Commit

Permalink
Do not crash on disk.wwn value being None (#1711571)
Browse files Browse the repository at this point in the history
  • Loading branch information
rvykydal committed Jan 8, 2020
1 parent c64d5c3 commit 90cd6cc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pyanaconda/ui/gui/spokes/storage.py
Expand Up @@ -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
Expand Down

0 comments on commit 90cd6cc

Please sign in to comment.