This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author roger.serwy
Recipients roger.serwy
Date 2012-11-18.17:37:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1353260229.78.0.447155145539.issue16504@psf.upfronthosting.co.za>
In-reply-to
Content
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)
History
Date User Action Args
2012-11-18 17:37:09roger.serwysetrecipients: + roger.serwy
2012-11-18 17:37:09roger.serwysetmessageid: <1353260229.78.0.447155145539.issue16504@psf.upfronthosting.co.za>
2012-11-18 17:37:09roger.serwylinkissue16504 messages
2012-11-18 17:37:09roger.serwycreate