Show More
@@ -805,8 +805,10 b' class VerboseTB(TBTools):' | |||||
805 | elif token_type == tokenize.NEWLINE: |
|
805 | elif token_type == tokenize.NEWLINE: | |
806 | break |
|
806 | break | |
807 |
|
807 | |||
808 | except (IndexError, UnicodeDecodeError): |
|
808 | except (IndexError, UnicodeDecodeError, SyntaxError): | |
809 | # signals exit of tokenizer |
|
809 | # signals exit of tokenizer | |
|
810 | # SyntaxError can occur if the file is not actually Python | |||
|
811 | # - see gh-6300 | |||
810 | pass |
|
812 | pass | |
811 | except tokenize.TokenError as msg: |
|
813 | except tokenize.TokenError as msg: | |
812 | _m = ("An unexpected error occurred while tokenizing input\n" |
|
814 | _m = ("An unexpected error occurred while tokenizing input\n" |
General Comments 0
You need to be logged in to leave comments.
Login now