summaryrefslogtreecommitdiffstats
path: root/image.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2002-10-07 21:46:45 +0000
committerJeremy Katz <katzj@redhat.com>2002-10-07 21:46:45 +0000
commitc5a0a9b8a716679ed9aca0870eb23790dec4e329 (patch)
tree2abb29a0ee21650cc4ef6a91e8f1a2369830b311 /image.py
parenta4aef484430a0fee4898f979ae4714e7650046c1 (diff)
downloadanaconda-c5a0a9b8a716679ed9aca0870eb23790dec4e329.tar.gz
anaconda-c5a0a9b8a716679ed9aca0870eb23790dec4e329.tar.xz
anaconda-c5a0a9b8a716679ed9aca0870eb23790dec4e329.zip
# if self.currentDisc is empty, then we shouldn't have anything
# mounted. double-check by trying to unmount, but we don't want # to get into a loop of trying to unmount forever. if # self.currentDisc is set, then it should still be mounted and # we want to loop until it unmounts successfully
Diffstat (limited to 'image.py')
-rw-r--r--image.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/image.py b/image.py
index d5eabd076..0260048b0 100644
--- a/image.py
+++ b/image.py
@@ -127,7 +127,19 @@ class CdromInstallMethod(ImageInstallMethod):
self.timestamp = timestamp
needed = h[1000002]
- self.unmountCD()
+
+ # if self.currentDisc is empty, then we shouldn't have anything
+ # mounted. double-check by trying to unmount, but we don't want
+ # to get into a loop of trying to unmount forever. if
+ # self.currentDisc is set, then it should still be mounted and
+ # we want to loop until it unmounts successfully
+ if not self.currentDisc:
+ try:
+ isys.umount("/mnt/source")
+ except:
+ pass
+ else:
+ self.unmountCD()
done = 0