From e07754742050fe498d758fca8578da9babbc483a Mon Sep 17 00:00:00 2001 From: tarek Date: Sat, 12 Dec 2009 15:02:19 +0100 Subject: fixed the error message used in DistributionNotFound, otherwise it breaks zc.buildout --HG-- branch : distribute extra : rebase_source : fbcd6099522983770243735997694c3da40cd59f --- pkg_resources.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'pkg_resources.py') diff --git a/pkg_resources.py b/pkg_resources.py index 9f1baca4..3660a2a5 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -537,9 +537,13 @@ class WorkingSet(object): env = Environment(self.entries) dist = best[req.key] = env.best_match(req, self, installer) if dist is None: - msg = ("The '%s' distribution was not found on this " - "system, and is required by this application.") - raise DistributionNotFound(msg % req) + #msg = ("The '%s' distribution was not found on this " + # "system, and is required by this application.") + #raise DistributionNotFound(msg % req) + + # unfortunately, zc.buildout uses a str(err) + # to get the name of the distribution here.. + raise DistributionNotFound(req) to_activate.append(dist) if dist not in req: # Oops, the "best" so far conflicts with a dependency -- cgit v1.2.1