Commit b0ec0009 authored by Jim Fulton's avatar Jim Fulton

Added "doing" info when getting distributions.

Treat DistutilsErrors as user errors.
parent b6efe7dd
......@@ -16,6 +16,7 @@
$Id$
"""
import distutils.errors
import logging
import md5
import os
......@@ -1181,7 +1182,10 @@ def main(args=None):
sys.stderr.write('\nStarting pdb:\n')
pdb.post_mortem(exc_info[2])
else:
if isinstance(v, zc.buildout.UserError):
if isinstance(v, (zc.buildout.UserError,
distutils.errors.DistutilsError,
)
):
_error(str(v))
else:
_internal_error(v)
......
......@@ -249,6 +249,8 @@ class Installer:
def _get_dist(self, requirement, ws, always_unzip):
__doing__ = 'Getting distribution for %s', requirement
# Maybe an existing dist is already the best dist that satisfies the
# requirement
dist = self._satisfied(requirement)
......
......@@ -1324,6 +1324,23 @@ def internal_errors():
global name 'os' is not defined
"""
def download_errors():
"""
>>> write(sample_buildout, 'buildout.cfg',
... '''
... [buildout]
... parts =
... find-links = http://127.0.0.1/no-shuch-thing
... ''')
>>> print system(buildout), # doctest: +ELLIPSIS
While:
Installing
Checking for upgrades
Getting distribution for setuptools
Error: Download error...
"""
######################################################################
......
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