Commit 4f06b3cc authored by tarek's avatar tarek

nicer message when DistributionNotFound is raised

--HG--
branch : distribute
extra : rebase_source : b25209fbcd33b497cb92ed7d8f442403c4eaf152
parent a5319bc6
......@@ -11,6 +11,7 @@ CHANGES
Initial Patch by arfrever.
* Issue 89: added a side bar with a download link to the doc.
* Issue 86: fixed missing sentence in pkg_resources doc.
* Added a nicer error message when a DistributionNotFound is raised.
-----
0.6.8
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment