New submission from Matt Bogosian:

>From (e.g) 
>https://github.com/python/cpython/blob/2.7/Lib/distutils/command/check.py#L145:

{{{
        try:
            parser.parse(data, document)
        except AttributeError as e:  # <- this could happen anywhere inside 
parser.parse
            reporter.messages.append(
(-1, 'Could not finish the parsing: %s.' % e, '', {}))
}}}

Without a stack trace, diagnosing problems like #23063 becomes unnecessarily 
difficult. See also:

* https://sourceforge.net/p/docutils/bugs/270/
* https://sourceforge.net/p/docutils/bugs/302/

I'd offer a patch, but I'm not sure what is meant to be signaled by the 
`AttributeError`. (Could `parser.parse` not exist? Is it something else?)

----------
components: Distutils
messages: 283338
nosy: dstufft, eric.araujo, posita
priority: normal
severity: normal
status: open
title: distutils/check.py overzealous catch block hides errors
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28981>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to