diff --git a/Lib/distutils/core.py b/Lib/distutils/core.py index 6242775c11b..bd9b8542cd4 100644 --- a/Lib/distutils/core.py +++ b/Lib/distutils/core.py @@ -112,10 +112,10 @@ class found in 'cmdclass' is used in place of the default, which is _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