Commit e81454ba authored by jim's avatar jim

Added "doing" info when getting distributions.

Treat DistutilsErrors as user errors.


git-svn-id: http://svn.zope.org/repos/main/zc.buildout/trunk@73126 62d5b8a3-27da-0310-9561-8e5933582275
parent 98b35d04
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
$Id$ $Id$
""" """
import distutils.errors
import logging import logging
import md5 import md5
import os import os
...@@ -1181,7 +1182,10 @@ def main(args=None): ...@@ -1181,7 +1182,10 @@ def main(args=None):
sys.stderr.write('\nStarting pdb:\n') sys.stderr.write('\nStarting pdb:\n')
pdb.post_mortem(exc_info[2]) pdb.post_mortem(exc_info[2])
else: else:
if isinstance(v, zc.buildout.UserError): if isinstance(v, (zc.buildout.UserError,
distutils.errors.DistutilsError,
)
):
_error(str(v)) _error(str(v))
else: else:
_internal_error(v) _internal_error(v)
......
...@@ -249,6 +249,8 @@ class Installer: ...@@ -249,6 +249,8 @@ class Installer:
def _get_dist(self, requirement, ws, always_unzip): 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 # Maybe an existing dist is already the best dist that satisfies the
# requirement # requirement
dist = self._satisfied(requirement) dist = self._satisfied(requirement)
......
...@@ -1323,6 +1323,23 @@ def internal_errors(): ...@@ -1323,6 +1323,23 @@ def internal_errors():
NameError: NameError:
global name 'os' is not defined 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