diff options
author | David Lehman <dlehman@redhat.com> | 2009-04-06 18:29:42 -0500 |
---|---|---|
committer | David Lehman <dlehman@redhat.com> | 2009-04-07 11:56:07 -0500 |
commit | 60366544ead37a71cd8c3b03af48772c333acc46 (patch) | |
tree | b26fde6ba95438d1bc64f8ec88ddc05a19e989e8 /storage/formats/fs.py | |
parent | cdf5b2c50d05a257920bc4b8e7dffe03262f9fe5 (diff) | |
download | anaconda-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.py | 7 |
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], |