summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fsset.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/fsset.py b/fsset.py
index f6db693ae..a2d83924d 100644
--- a/fsset.py
+++ b/fsset.py
@@ -377,7 +377,7 @@ class swapFileSystem(FileSystemType):
def umount(self, device, path):
# unfortunately, turning off swap is bad.
- pass
+ raise RuntimeError, "unable to turn off swap"
def formatDevice(self, entry, progress, chroot='/'):
file = entry.device.setupDevice(chroot)
@@ -944,9 +944,12 @@ class FileSystemSetEntry:
def umount(self, chroot='/'):
if self.mountcount > 0:
- self.fsystem.umount(self.device, "%s/%s" % (chroot,
- self.mountpoint))
- self.mountcount = self.mountcount - 1
+ try:
+ self.fsystem.umount(self.device, "%s/%s" % (chroot,
+ self.mountpoint))
+ self.mountcount = self.mountcount - 1
+ except RuntimeError:
+ pass
def setFileSystemType(self, fstype):
self.fsystem = fstype