Terry J. Reedy added the comment: The distutils error is a ValueError, which was printed as such before I added 'Exception' to the except statement.
I did not initially catch SyntaxError separately because some are caught during the compile phase. Revised file corrects 'pass' to 'continue' and continues with parse errors also. Many test/badsyntax files have compile-time syntax errors. SyntaxError 'await' outside function (badsyntax_async1.py, line 1) SyntaxError 'yield' inside async function (badsyntax_async6.py, line 2) SyntaxError from __future__ imports must occur at the beginning of the file (badsyntax_future10.py, line 3) SyntaxError future feature rested_snopes is not defined (badsyntax_future3.py, line 3) SyntaxError not a chance (badsyntax_future9.py, line 3) Attached is a fully recursive version that only report compile errors for non-'badsyntax' files. It takes about 2 seconds more. Output: C:/programs/Python35/Lib\distutils _msvccompiler.py ValueError None disallowed in expression list 1776 (files compiled) I excluded site-packages after testing on 3.4 because pylint has bad syntax examples giving a page of error messages. ---------- Added file: http://bugs.python.org/file40360/tem_ast2.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24981> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com