Message249839
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. |
|
Date |
User |
Action |
Args |
2015-09-04 21:58:23 | terry.reedy | set | recipients:
+ terry.reedy, brett.cannon, rhettinger, yselivanov |
2015-09-04 21:58:22 | terry.reedy | set | messageid: <1441403902.99.0.749796663538.issue24981@psf.upfronthosting.co.za> |
2015-09-04 21:58:22 | terry.reedy | link | issue24981 messages |
2015-09-04 21:58:22 | terry.reedy | create | |
|