diff options
author | Chris Lumens <clumens@redhat.com> | 2006-03-13 15:59:47 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2006-03-13 15:59:47 +0000 |
commit | 716db4c09b07fdeaf4b0d0839fea66b031171bcf (patch) | |
tree | 47c0ddb50e0945aac4328d114c6ff6d105c995c7 | |
parent | 4363d3c29397ae21492b4727b7393b5a52e2a508 (diff) | |
download | anaconda-716db4c09b07fdeaf4b0d0839fea66b031171bcf.tar.gz anaconda-716db4c09b07fdeaf4b0d0839fea66b031171bcf.tar.xz anaconda-716db4c09b07fdeaf4b0d0839fea66b031171bcf.zip |
Prompt for missing images like we do on NFS ISO installs (#185274).
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | harddrive.py | 37 |
2 files changed, 34 insertions, 8 deletions
@@ -1,3 +1,8 @@ +2006-03-13 Chris Lumens <clumens@redhat.com> + + * harddrive.py (HardDriveInstallMethod.mountMedia): Prompt for + missing images like we do on NFS ISO installs (#185274). + 2006-03-10 Chris Lumens <clumens@redhat.com> * exception.py (handleException): String consistency (#181916). diff --git a/harddrive.py b/harddrive.py index 8c5554204..7189c5794 100644 --- a/harddrive.py +++ b/harddrive.py @@ -45,14 +45,35 @@ class HardDriveInstallMethod(ImageInstallMethod): self.mountDirectory() - isoImage = self.isoDir + '/' + self.path + '/' + self.discImages[cdNum] - - isys.makeDevInode("loop3", "/tmp/loop3") - isys.losetup("/tmp/loop3", isoImage, readOnly = 1) - - isys.mount("loop3", "/tmp/isomedia", fstype = 'iso9660', readOnly = 1); - self.tree = "/tmp/isomedia/" - self.mediaIsMounted = cdNum + retry = True + while retry: + try: + isoImage = self.isoDir + '/' + self.path + '/' + self.discImages[cdNum] + + isys.makeDevInode("loop3", "/tmp/loop3") + isys.losetup("/tmp/loop3", isoImage, readOnly = 1) + + isys.mount("loop3", "/tmp/isomedia", fstype = 'iso9660', readOnly = 1); + self.tree = "/tmp/isomedia/" + self.mediaIsMounted = cdNum + + retry = False + except: + ans = self.messageWindow( _("Missing ISO 9660 Image"), + _("The installer has tried to mount " + "image #%s, but cannot find it on " + "the hard drive.\n\n" + "Please copy this image to the " + "drive and click Retry. Click Reboot " + " to abort the installation.") + % (cdNum,), type="custom", + custom_icon="warning", + custom_buttons=[_("_Reboot"), + _("Re_try")]) + if ans == 0: + sys.exit(0) + elif ans == 1: + self.discImages = findIsoImages(self.isoPath, self.messageWindow) def umountMedia(self): if self.mediaIsMounted: |