mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
Call 'parse_config_files()' at the appropriate point.
Tweaked error-generating code.
This commit is contained in:
parent
1426354cf6
commit
bb8c71d563
1 changed files with 7 additions and 7 deletions
|
@ -71,11 +71,11 @@ def setup (**attrs):
|
||||||
# (ie. everything except distclass) to initialize it
|
# (ie. everything except distclass) to initialize it
|
||||||
dist = klass (attrs)
|
dist = klass (attrs)
|
||||||
|
|
||||||
# If we had a config file, this is where we would parse it: override
|
# Find and parse the config file(s): they will override options from
|
||||||
# the client-supplied command options, but be overridden by the
|
# the setup script, but be overridden by the command line.
|
||||||
# command line.
|
dist.parse_config_files()
|
||||||
|
|
||||||
# Parse the command line; any command-line errors are the end-users
|
# Parse the command line; any command-line errors are the end user's
|
||||||
# fault, so turn them into SystemExit to suppress tracebacks.
|
# fault, so turn them into SystemExit to suppress tracebacks.
|
||||||
try:
|
try:
|
||||||
ok = dist.parse_command_line (sys.argv[1:])
|
ok = dist.parse_command_line (sys.argv[1:])
|
||||||
|
@ -101,7 +101,7 @@ def setup (**attrs):
|
||||||
raise SystemExit, \
|
raise SystemExit, \
|
||||||
"error: %s" % exc.strerror
|
"error: %s" % exc.strerror
|
||||||
else:
|
else:
|
||||||
raise SystemExit, "error: " + exc[-1]
|
raise SystemExit, "error: " + str(exc[-1])
|
||||||
except (DistutilsExecError,
|
except (DistutilsExecError,
|
||||||
DistutilsFileError,
|
DistutilsFileError,
|
||||||
DistutilsOptionError), msg:
|
DistutilsOptionError), msg:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue