[PATCH 8/9] If the disk has no serial number, don't give the DiskOverview a popup.

Chris Lumens clumens at redhat.com
Wed Mar 20 20:28:28 UTC 2013


Without a serial, it just says "None", and there's no other useful data
we could give for a disk.
---
 pyanaconda/ui/gui/spokes/storage.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index 5f95149..ee95e6a 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -552,7 +552,10 @@ class StorageSpoke(NormalSpoke, StorageChecker):
             kind = "drive-harddisk"
 
         size = size_str(disk.size)
-        popup_info = "%s" % disk.serial
+        if disk.serial:
+            popup_info = "%s" % disk.serial
+        else:
+            popup_info = None
 
         # We don't want to display the whole huge WWID for a multipath device.
         # That makes the DO way too wide.
-- 
1.8.1.2



More information about the anaconda-patches mailing list