Message175895
IDLE's IndentSearcher class in EditorWindow.py can raise an uncaught IndentationError when opening a file. The attached patch fixes the problem by catching everything that the tokenize module can raise explicitly, namely IndentationError, TokenError, and SyntaxError.
Alternatively, the except clause can be left bare, as it is disappointing to crash IDLE when simply guessing the indent width of a file. (See "guess_indent" in EditorWindow.py) |
|
Date |
User |
Action |
Args |
2012-11-18 17:37:09 | roger.serwy | set | recipients:
+ roger.serwy |
2012-11-18 17:37:09 | roger.serwy | set | messageid: <1353260229.78.0.447155145539.issue16504@psf.upfronthosting.co.za> |
2012-11-18 17:37:09 | roger.serwy | link | issue16504 messages |
2012-11-18 17:37:09 | roger.serwy | create | |
|