[PATCH 9/9] Show fstype as "Unknown" for devices with unrecognised formatting.

David Lehman dlehman at redhat.com
Mon Aug 20 14:20:42 UTC 2012


Much like the btrfs hacks, we add "Unknown" onto the end of the list
only when the current device is unformatted and do not include it in
the list for other devices.
---
 pyanaconda/ui/gui/spokes/custom.py |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 801295a..6f5fdcc 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -697,6 +697,16 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
         elif btrfs_included and not include_btrfs:
             typeCombo.remove(len(typeCombo.get_model()) - 1)
 
+        # if the format is unknown/none, add that to the list
+        # otherwise, make sure it's not in the list
+        unknown_fmt = getFormat(None)
+        include_unknown = device.format.type is None
+        unknown_included = fsCombo.get_model()[-1][0] == unknown_fmt.name
+        if include_unknown and not unknown_included:
+            fsCombo.append_text(unknown_fmt.name)
+        elif unknown_included and not include_unknown:
+            fsCombo.remove(len(fsCombo.get_model()) - 1)
+
         # FIXME:  What do we do if we can't figure it out?
         if device.type == "lvmlv":
             typeCombo.set_active(DEVICE_TYPE_LVM)
-- 
1.7.7.6



More information about the anaconda-patches mailing list