diff options
author | Greg Ward <gward@python.net> | 2000-06-17 02:17:45 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 2000-06-17 02:17:45 (GMT) |
commit | cf0e2dde6def31714accc13bf77c48af281140eb (patch) | |
tree | 8e8da84401772dd01b0a18b64ce52581239e3e57 /Lib/distutils/core.py | |
parent | e905513be0718c5a8edafe70efc0fe0d4f290573 (diff) | |
download | cpython-cf0e2dde6def31714accc13bf77c48af281140eb.zip cpython-cf0e2dde6def31714accc13bf77c48af281140eb.tar.gz cpython-cf0e2dde6def31714accc13bf77c48af281140eb.tar.bz2 |
Changed to use the new 'grok_environment_error()' function instead of
muddling through IOError and OSError exception objects right here.
Diffstat (limited to 'Lib/distutils/core.py')
-rw-r--r-- | Lib/distutils/core.py | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/Lib/distutils/core.py b/Lib/distutils/core.py index 8bcf2a8..35afa84 100644 --- a/Lib/distutils/core.py +++ b/Lib/distutils/core.py @@ -112,16 +112,7 @@ def setup (**attrs): except KeyboardInterrupt: raise SystemExit, "interrupted" except (IOError, os.error), exc: - # check for Python 1.5.2-style {IO,OS}Error exception objects - if hasattr (exc, 'filename') and hasattr (exc, 'strerror'): - if exc.filename: - error = "error: %s: %s" % (exc.filename, exc.strerror) - else: - # two-argument functions in posix module don't - # include the filename in the exception object! - error = "error: %s" % exc.strerror - else: - error = "error: " + str(exc[-1]) + error = grok_environment_error(exc) if DEBUG: sys.stderr.write(error + "\n") |