Catch DistutilsOptionError in 'setup()' -- it's thrown either because of

errors in the setup script or on the command line, so shouldn't result
in a traceback.
This commit is contained in:
Greg Ward 2000-04-22 03:11:17 +00:00
parent db80754abc
commit ddad73bca9
1 changed files with 3 additions and 1 deletions

View File

@ -96,7 +96,9 @@ def setup (**attrs):
"error: %s: %s" % (exc.filename, exc.strerror)
else:
raise SystemExit, str (exc)
except (DistutilsExecError, DistutilsFileError), msg:
except (DistutilsExecError,
DistutilsFileError,
DistutilsOptionError), msg:
raise SystemExit, "error: " + str (msg)
# setup ()