diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py index e0ae2e5ea27..917f1d0b93f 100644 --- a/Lib/distutils/util.py +++ b/Lib/distutils/util.py @@ -269,7 +269,7 @@ def grok_environment_error (exc, prefix="error: "): # include the filename in the exception object! error = prefix + "%s" % exc.strerror else: - error = prefix + str(exc[-1]) + error = prefix + str(exc.args[-1]) return error