diff options
Diffstat (limited to 'packages.py')
-rw-r--r-- | packages.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/packages.py b/packages.py index ad10504a4..7c62342ec 100644 --- a/packages.py +++ b/packages.py @@ -306,9 +306,11 @@ class InstallCallback: self.size = h[rpm.RPMTAG_SIZE] while self.rpmFD < 0: + # this should never fail right? So lets put it before the try. + fn = self.method.getFilename(h, self.pkgTimer) # log("Opening rpm %s", fn) + try: - fn = self.method.getFilename(h, self.pkgTimer) self.rpmFD = os.open(fn, os.O_RDONLY) # Make sure this package seems valid @@ -331,8 +333,11 @@ class InstallCallback: self.method.unmountCD() self.messageWindow(_("Error"), _("The file %s cannot be opened. This is due to " - "a missing file, a bad package, or bad media. " - "Press <return> to try again.") % fn) + "a missing file or perhaps a corrupt package. If " + "you are installing from CD media this usually " + "means the CD media is corrupt, or the CD drive is " + "unable to read the media.\n\n" + "Press <return> to try again.") % (fn,)) fn = self.method.unlinkFilename(fn) return self.rpmFD |