summaryrefslogtreecommitdiffstats
path: root/yuminstall.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2009-03-24 09:34:41 -0400
committerChris Lumens <clumens@redhat.com>2009-03-24 09:41:46 -0400
commited2883f06e20d2beda75e1f3fbdb5b827c31a9b0 (patch)
treeedfff1b2c34d166c2d89cfb52ab0fff72481564e /yuminstall.py
parent74df7604a2bfd0af0df3c60cffb4b5b0ab325cc8 (diff)
downloadanaconda-ed2883f06e20d2beda75e1f3fbdb5b827c31a9b0.tar.gz
anaconda-ed2883f06e20d2beda75e1f3fbdb5b827c31a9b0.tar.xz
anaconda-ed2883f06e20d2beda75e1f3fbdb5b827c31a9b0.zip
Use the mount and unmount methods on OpticalDevice.format now.
Diffstat (limited to 'yuminstall.py')
-rw-r--r--yuminstall.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/yuminstall.py b/yuminstall.py
index 3bcb78d1f..dc2dde597 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -322,27 +322,28 @@ class AnacondaYum(YumSorter):
self._timestamp = f.readline().strip()
f.close()
+ dev = self.anaconda.id.storage.devicetree.getDeviceByName(self.anaconda.mediaDevice)
+ dev.format.mountpoint = self.tree
+
# If self.currentMedia is None, then there shouldn't be anything
# mounted. Before going further, see if the correct disc is already
# in the drive. This saves a useless eject and insert if the user
# has for some reason already put the disc in the drive.
if self.currentMedia is None:
try:
- isys.mount(self.anaconda.mediaDevice, self.tree,
- fstype="iso9660", readOnly=True)
+ dev.format.mount()
if verifyMedia(self.tree, discnum, None):
self.currentMedia = discnum
return
- isys.umount(self.tree)
+ dev.format.unmount()
except:
pass
else:
- unmountCD(self.tree, self.anaconda.intf.messageWindow)
+ unmountCD(dev, self.anaconda.intf.messageWindow)
self.currentMedia = None
- dev = self.anaconda.id.storage.devicetree.getDeviceByName(self.anaconda.mediaDevice)
dev.eject()
while True:
@@ -354,8 +355,7 @@ class AnacondaYum(YumSorter):
discnum))
try:
- isys.mount(self.anaconda.mediaDevice, self.tree,
- fstype = "iso9660", readOnly = True)
+ dev.format.mount()
if verifyMedia(self.tree, discnum, self._timestamp):
self.currentMedia = discnum
@@ -364,8 +364,9 @@ class AnacondaYum(YumSorter):
self.anaconda.intf.messageWindow(_("Wrong Disc"),
_("That's not the correct %s disc.")
% (productName,))
- isys.umount(self.tree)
- isys.ejectCdrom(self.anaconda.mediaDevice)
+
+ dev.format.unmount()
+ dev.eject()
except:
self.anaconda.intf.messageWindow(_("Error"),
_("Unable to access the disc."))