diff options
author | Jeremy Katz <katzj@redhat.com> | 2002-11-19 20:11:26 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2002-11-19 20:11:26 +0000 |
commit | bcb91a33cbf10acde08d099d48e72c4dc3355527 (patch) | |
tree | dc35a580b5a4d965d64a77e8ccc914efa6283be9 /packages.py | |
parent | aceb9cf333ad1b4dac057b450bf3cadc7871f8c4 (diff) | |
download | anaconda-bcb91a33cbf10acde08d099d48e72c4dc3355527.tar.gz anaconda-bcb91a33cbf10acde08d099d48e72c4dc3355527.tar.xz anaconda-bcb91a33cbf10acde08d099d48e72c4dc3355527.zip |
the getFilename can actually fail since this is where we copy the file
to a temporary location for ftp/http and cdrom installs. so, put it
inside the try and instead of using fn, use name-ver-rel
Diffstat (limited to 'packages.py')
-rw-r--r-- | packages.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/packages.py b/packages.py index 7c62342ec..9df6ce2a6 100644 --- a/packages.py +++ b/packages.py @@ -306,11 +306,8 @@ 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 @@ -332,12 +329,14 @@ class InstallCallback: except: self.method.unmountCD() self.messageWindow(_("Error"), - _("The file %s cannot be opened. This is due to " - "a missing file or perhaps a corrupt package. If " - "you are installing from CD media this usually " + _("The package %s-%s-%s cannot be opened. This is due " + "to 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,)) + "Press <return> to try again.") % (h['name'], + h['version'], + h['release'])) fn = self.method.unlinkFilename(fn) return self.rpmFD |