summaryrefslogtreecommitdiffstats
path: root/storage/formats/fs.py
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2009-04-06 18:29:42 -0500
committerDavid Lehman <dlehman@redhat.com>2009-04-07 11:56:07 -0500
commit60366544ead37a71cd8c3b03af48772c333acc46 (patch)
treeb26fde6ba95438d1bc64f8ec88ddc05a19e989e8 /storage/formats/fs.py
parentcdf5b2c50d05a257920bc4b8e7dffe03262f9fe5 (diff)
downloadanaconda-60366544ead37a71cd8c3b03af48772c333acc46.tar.gz
anaconda-60366544ead37a71cd8c3b03af48772c333acc46.tar.xz
anaconda-60366544ead37a71cd8c3b03af48772c333acc46.zip
Try not to raise exceptions from minSize calculators.
These should either get a min size or return a reasonable default. Crashing the installer for something like this is not reasonable.
Diffstat (limited to 'storage/formats/fs.py')
-rw-r--r--storage/formats/fs.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/storage/formats/fs.py b/storage/formats/fs.py
index fb79ee095..657f73c4b 100644
--- a/storage/formats/fs.py
+++ b/storage/formats/fs.py
@@ -749,10 +749,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")
@@ -1012,7 +1009,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],