summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2015-01-15 04:56:35 (GMT)
committerBenjamin Peterson <benjamin@python.org>2015-01-15 04:56:35 (GMT)
commit562b7cbff9ec2a69694aabfb4845208c851bd08e (patch)
tree85f2cda8b98e438e2639a342eba6301da3404d5c /Lib/distutils/command
parent29ad0111bd8c7edd049c964c66cfb9e9114c99d2 (diff)
downloadcpython-562b7cbff9ec2a69694aabfb4845208c851bd08e.zip
cpython-562b7cbff9ec2a69694aabfb4845208c851bd08e.tar.gz
cpython-562b7cbff9ec2a69694aabfb4845208c851bd08e.tar.bz2
fix parsing reST with code or code-block directives (closes #23063)
Patch by Marc Abramowitz.
Diffstat (limited to 'Lib/distutils/command')
-rw-r--r--Lib/distutils/command/check.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/distutils/command/check.py b/Lib/distutils/command/check.py
index 22b9349..7ebe707 100644
--- a/Lib/distutils/command/check.py
+++ b/Lib/distutils/command/check.py
@@ -122,7 +122,7 @@ class check(Command):
"""Returns warnings when the provided data doesn't compile."""
source_path = StringIO()
parser = Parser()
- settings = frontend.OptionParser().get_default_values()
+ settings = frontend.OptionParser(components=(Parser,)).get_default_values()
settings.tab_width = 4
settings.pep_references = None
settings.rfc_references = None
@@ -138,8 +138,8 @@ class check(Command):
document.note_source(source_path, -1)
try:
parser.parse(data, document)
- except AttributeError:
- reporter.messages.append((-1, 'Could not finish the parsing.',
- '', {}))
+ except AttributeError as e:
+ reporter.messages.append(
+ (-1, 'Could not finish the parsing: %s.' % e, '', {}))
return reporter.messages