]> granicus.if.org Git - python/commitdiff
Catch DistutilSetupError from the Distribution constructor.
authorGreg Ward <gward@python.net>
Sat, 3 Jun 2000 01:02:06 +0000 (01:02 +0000)
committerGreg Ward <gward@python.net>
Sat, 3 Jun 2000 01:02:06 +0000 (01:02 +0000)
Lib/distutils/core.py

index 2bad10e438765de3951d114611a35056b21d84a1..8bcf2a87d694ae46efa16cf0838c7f89a11cdec7 100644 (file)
@@ -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.