[New-bugs-announce] [issue19333] distutils.util.grok_environment_error loses the error message

Marius Gedminas report at bugs.python.org
Mon Oct 21 16:05:17 CEST 2013


New submission from Marius Gedminas:

Steps to reproduce:

$ python -c 'from distutils.util import grok_environment_error as e; print(e(IOError("message")))'

What I expect to see:
error: message

What I get instead:
error: None

This is a problem because it hides the error message in a real-life use case: trying to use the latest setuptools in an ancient virtualenv (see [1]).  TL;DR version:
- sysconfig (in the standard library) raises IOError(msg),
- which is then caught and passed throughdistutils.util.grok_environment_error(),
- which then returns an unfriendly 'error: None'.

[1] https://bitbucket.org/pypa/setuptools/issue/89/easy_install-quits-with-error-none-in

----------
assignee: eric.araujo
components: Distutils
messages: 200785
nosy: eric.araujo, mgedmin, tarek
priority: normal
severity: normal
status: open
title: distutils.util.grok_environment_error loses the error message
type: behavior
versions: Python 2.7, Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19333>
_______________________________________


More information about the New-bugs-announce mailing list