From 39851516425b668cebafcc6bd8d2a8ed31db7833 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sat, 3 Jun 2000 01:02:06 +0000 Subject: Catch DistutilSetupError from the Distribution constructor. --- Lib/distutils/core.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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. -- cgit v0.12