aboutsummaryrefslogtreecommitdiffstats
path: root/pkg_resources.py
diff options
context:
space:
mode:
authortarek <none@none>2009-11-14 20:01:49 +0100
committertarek <none@none>2009-11-14 20:01:49 +0100
commit4f06b3cc70d5a1457c0a158b3a2f1be1c4ea851c (patch)
treeff5bdd3a6854b9cdc691b54d9091f1ab55196307 /pkg_resources.py
parenta5319bc62245b80ed702f73519ac2c27805c3acf (diff)
downloadexternal_python_setuptools-4f06b3cc70d5a1457c0a158b3a2f1be1c4ea851c.tar.gz
external_python_setuptools-4f06b3cc70d5a1457c0a158b3a2f1be1c4ea851c.tar.bz2
external_python_setuptools-4f06b3cc70d5a1457c0a158b3a2f1be1c4ea851c.zip
nicer message when DistributionNotFound is raised
--HG-- branch : distribute extra : rebase_source : b25209fbcd33b497cb92ed7d8f442403c4eaf152
Diffstat (limited to 'pkg_resources.py')
-rw-r--r--pkg_resources.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg_resources.py b/pkg_resources.py
index 96381932..4975680d 100644
--- a/pkg_resources.py
+++ b/pkg_resources.py
@@ -528,7 +528,9 @@ class WorkingSet(object):
env = Environment(self.entries)
dist = best[req.key] = env.best_match(req, self, installer)
if dist is None:
- raise DistributionNotFound(req) # XXX put more info here
+ msg = ("The '%s' distribution was not found on this "
+ "system, and is required by this application.")
+ raise DistributionNotFound(msg % req)
to_activate.append(dist)
if dist not in req:
# Oops, the "best" so far conflicts with a dependency