Backport from r23c1-branch:

Pimp crashed if you tried to install a non-installable package, in stead
of printing a decent error message. Fixes #773450..
This commit is contained in:
Jack Jansen 2003-07-21 20:47:11 +00:00
parent e676c5ef3e
commit 749f481478
1 changed files with 2 additions and 2 deletions

View File

@ -585,8 +585,8 @@ class PimpPackage:
If output is given it should be a file-like object and it If output is given it should be a file-like object and it
will receive a log of what happened.""" will receive a log of what happened."""
if not self._dict['Download-URL']: if not self._dict.get('Download-URL'):
return "%s: This package needs to be installed manually (no Download-URL field)" % _fmtpackagename(self) return "%s: This package needs to be installed manually (no Download-URL field)" % self.fullname()
msg = self.downloadPackageOnly(output) msg = self.downloadPackageOnly(output)
if msg: if msg:
return "%s: download: %s" % (self.fullname(), msg) return "%s: download: %s" % (self.fullname(), msg)