diff options
author | Chris Lumens <clumens@redhat.com> | 2007-08-06 14:32:26 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2007-08-06 14:32:26 +0000 |
commit | 0dd7c9925155533c6b669bcb70011b7cae239a84 (patch) | |
tree | fcb5c919a80125adcd9c2ee1ab3722a928eb7e41 /image.py | |
parent | cb2b73472f8b56560311ff3a48530470eeb9b65c (diff) | |
download | anaconda-0dd7c9925155533c6b669bcb70011b7cae239a84.tar.gz anaconda-0dd7c9925155533c6b669bcb70011b7cae239a84.tar.xz anaconda-0dd7c9925155533c6b669bcb70011b7cae239a84.zip |
Add a more specific error message if there's an I/O error as opposed to being
out of space (#250954).
Diffstat (limited to 'image.py')
-rw-r--r-- | image.py | 19 |
1 files changed, 13 insertions, 6 deletions
@@ -157,7 +157,7 @@ class CdromInstallMethod(ImageInstallMethod): if not os.path.exists("%s/images/stage2.img" %(self.tree,)): log.debug("Not copying non-existent stage2.img") return - + self.loopbackFile = "%s%s%s" % (chroot, fsset.filesystemSpace(chroot)[0][0], "/rhinstall-stage2.img") @@ -168,15 +168,22 @@ class CdromInstallMethod(ImageInstallMethod): shutil.copyfile("%s/images/stage2.img" % (self.tree,), self.loopbackFile) win.pop() - except Exception, e: + except Exception, e: if win: win.pop() log.critical("error transferring stage2.img: %s" %(e,)) - self.messageWindow(_("Error"), - _("An error occurred transferring the install image " - "to your hard drive. You are probably out of disk " - "space.")) + + if isinstance(e, IOError) and e.errno == 5: + msg = _("An error occurred transferring the install image " + "to your hard drive. This is probably due to " + "bad media.")) + else: + msg = _("An error occurred transferring the install image " + "to your hard drive. You are probably out of disk " + "space.")) + + self.messageWindow(_("Error", msg)) os.unlink(self.loopbackFile) return 1 |