[PATCH] Try not to raise exceptions from minSize calculators.

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

 



These should either get a min size or return a reasonable default.
Crashing the installer for something like this is not reasonable.
---
 storage/formats/fs.py |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/storage/formats/fs.py b/storage/formats/fs.py
index 0e155eb..eea1799 100644
--- a/storage/formats/fs.py
+++ b/storage/formats/fs.py
@@ -724,10 +724,7 @@ class Ext2FS(FS):
     def minSize(self):
         """ Minimum size for this filesystem in MB. """
         size = self._minSize
-        if self.exists:
-            if not os.path.exists(self.device):
-                raise FSError("device does not exist")
-
+        if self.exists and os.path.exists(self.device):
             buf = iutil.execWithCapture(self.resizefsProg,
                                         ["-P", self.device],
                                         stderr="/dev/tty5")
@@ -977,7 +974,7 @@ class NTFS(FS):
     def minSize(self):
         """ The minimum filesystem size in megabytes. """
         size = self._minSize
-        if self.exists:
+        if self.exists and os.path.exists(self.device):
             minSize = None
             buf = iutil.execWithCapture(self.resizefsProg,
                                         ["-m", self.device],
-- 
1.6.0.6

_______________________________________________
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