summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2000-06-03 01:02:06 (GMT)
committerGreg Ward <gward@python.net>2000-06-03 01:02:06 (GMT)
commit39851516425b668cebafcc6bd8d2a8ed31db7833 (patch)
tree30efb06e8285a9ede38a1949eb93817ef998737d /Lib
parent82d71cacb06c6118783cd3699403c2ec320d14b5 (diff)
downloadcpython-39851516425b668cebafcc6bd8d2a8ed31db7833.zip
cpython-39851516425b668cebafcc6bd8d2a8ed31db7833.tar.gz
cpython-39851516425b668cebafcc6bd8d2a8ed31db7833.tar.bz2
Catch DistutilSetupError from the Distribution constructor.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/distutils/core.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/distutils/core.py b/Lib/distutils/core.py
index 2bad10e..8bcf2a8 100644
--- a/Lib/distutils/core.py
+++ b/Lib/distutils/core.py
@@ -80,7 +80,10 @@ def setup (**attrs):
# Create the Distribution instance, using the remaining arguments
# (ie. everything except distclass) to initialize it
- dist = klass (attrs)
+ try:
+ dist = klass (attrs)
+ except DistutilsSetupError, msg:
+ raise SystemExit, "error in setup script: %s" % msg
# Find and parse the config file(s): they will override options from
# the setup script, but be overridden by the command line.