diff -r f70c16189876 -r cfabe07bc98f Lib/distutils/command/check.py --- a/Lib/distutils/command/check.py Mon Dec 15 20:45:23 2014 -0800 +++ b/Lib/distutils/command/check.py Mon Dec 15 23:56:11 2014 -0800 @@ -122,7 +122,7 @@ """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 @@ 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