diff options
author | Greg Ward <gward@python.net> | 2000-06-03 01:02:06 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 2000-06-03 01:02:06 (GMT) |
commit | 39851516425b668cebafcc6bd8d2a8ed31db7833 (patch) | |
tree | 30efb06e8285a9ede38a1949eb93817ef998737d /Lib/distutils/core.py | |
parent | 82d71cacb06c6118783cd3699403c2ec320d14b5 (diff) | |
download | cpython-39851516425b668cebafcc6bd8d2a8ed31db7833.zip cpython-39851516425b668cebafcc6bd8d2a8ed31db7833.tar.gz cpython-39851516425b668cebafcc6bd8d2a8ed31db7833.tar.bz2 |
Catch DistutilSetupError from the Distribution constructor.
Diffstat (limited to 'Lib/distutils/core.py')
-rw-r--r-- | Lib/distutils/core.py | 5 |
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. |