diff options
author | Éric Araujo <merwok@netwok.org> | 2014-03-12 07:34:02 (GMT) |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2014-03-12 07:34:02 (GMT) |
commit | fc773a2d4ba3810b982e703bf8a240206369e5d1 (patch) | |
tree | 7d1428117d5ec01e94cdba671e35755cf9462a3e /Lib/distutils/core.py | |
parent | ed5d95b76bd9a3584038bf578bac8f473a47e4c4 (diff) | |
download | cpython-fc773a2d4ba3810b982e703bf8a240206369e5d1.zip cpython-fc773a2d4ba3810b982e703bf8a240206369e5d1.tar.gz cpython-fc773a2d4ba3810b982e703bf8a240206369e5d1.tar.bz2 |
Avoid “error: None” messages from distutils (#4931).
Thanks to Amaury Forgeot d’Arc and Philip J. Eby.
Diffstat (limited to 'Lib/distutils/core.py')
-rw-r--r-- | Lib/distutils/core.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/distutils/core.py b/Lib/distutils/core.py index 260332a..25d91ba 100644 --- a/Lib/distutils/core.py +++ b/Lib/distutils/core.py @@ -11,7 +11,6 @@ import sys from distutils.debug import DEBUG from distutils.errors import * -from distutils.util import grok_environment_error # Mainly import these so setup scripts can "from distutils.core import" them. from distutils.dist import Distribution @@ -149,13 +148,11 @@ def setup (**attrs): except KeyboardInterrupt: raise SystemExit("interrupted") except (IOError, os.error) as exc: - error = grok_environment_error(exc) - if DEBUG: - sys.stderr.write(error + "\n") + sys.stderr.write("error: %s\n" % (exc,)) raise else: - raise SystemExit(error) + raise SystemExit("error: %s" % (exc,)) except (DistutilsError, CCompilerError) as msg: |