[PATCH] Fix behavior when makeFsList is passed usetypes, cleanup code.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 - Fixes #472739
---
 textw/partition_text.py |   21 ++++++++++-----------
 1 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/textw/partition_text.py b/textw/partition_text.py
index 1944ee1..f0cc6fa 100644
--- a/textw/partition_text.py
+++ b/textw/partition_text.py
@@ -349,21 +349,20 @@ class PartitionWindow:
             names = usetypes
         else:
             names = types.keys()
+        if ignorefs is None:
+            ignorefs = []
+        names = [n for n in names if n not in ignorefs and \
+            fileSystemTypeGet(n).isSupported() and \
+            fileSystemTypeGet(n).isFormattable()]
         names.sort()
         for name in names:
-            if not fileSystemTypeGet(name).isSupported():
-                continue
-
-            if ignorefs and name in ignorefs:
-                continue
-
-            if fileSystemTypeGet(name).isFormattable():
-                fstype.append(name, types[name])
-        if request.fstype and request.fstype.getName() in names and \
-           request.fstype.isFormattable() and request.fstype.isSupported():
+            fstype.append(name, types[name])
+        if request.fstype and request.fstype.getName() in names:
             fstype.setCurrent(request.fstype)
         else:
-            fstype.setCurrent(fileSystemTypeGetDefault())
+            defaulttype = fileSystemTypeGetDefault()
+            if defaulttype.getName() in names:
+                fstype.setCurrent(defaulttype)
         subgrid.setField(fstype, 0, row)
         if usecallback:
             fstype.setCallback(self.fstypeSetCB, (fstype, self.mount))
-- 
1.6.0.6

Attachment: pgpskCI06fLfc.pgp
Description: PGP signature

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux