]> granicus.if.org Git - python/commitdiff
Fix a bug in distutils.core's error handling.
authorCollin Winter <collinw@gmail.com>
Tue, 17 Jul 2007 00:38:21 +0000 (00:38 +0000)
committerCollin Winter <collinw@gmail.com>
Tue, 17 Jul 2007 00:38:21 +0000 (00:38 +0000)
Lib/distutils/core.py

index 6242775c11b141481a2d09a6e7793882f66fac20..bd9b8542cd4af8fbac6fcecf5acf33ddd16da3ef 100644 (file)
@@ -112,10 +112,10 @@ def setup (**attrs):
         _setup_distribution = dist = klass(attrs)
     except DistutilsSetupError as msg:
         if 'name' not in attrs:
+            raise SystemExit, "error in setup command: %s" % msg
+        else:
             raise SystemExit, "error in %s setup command: %s" % \
                   (attrs['name'], msg)
-        else:
-            raise SystemExit, "error in setup command: %s" % msg
 
     if _setup_stop_after == "init":
         return dist