From: Greg Ward Date: Sat, 3 Jun 2000 01:02:06 +0000 (+0000) Subject: Catch DistutilSetupError from the Distribution constructor. X-Git-Tag: v2.0b1~1590 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=39851516425b668cebafcc6bd8d2a8ed31db7833;p=python Catch DistutilSetupError from the Distribution constructor. --- diff --git a/Lib/distutils/core.py b/Lib/distutils/core.py index 2bad10e438..8bcf2a87d6 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.