]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport from r23c1-branch:
authorJack Jansen <jack.jansen@cwi.nl>
Mon, 21 Jul 2003 20:47:11 +0000 (20:47 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Mon, 21 Jul 2003 20:47:11 +0000 (20:47 +0000)
Pimp crashed if you tried to install a non-installable package, in stead
of printing a decent error message. Fixes #773450..

Lib/plat-mac/pimp.py

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