diff options
author | Georg Brandl <georg@python.org> | 2006-08-14 21:34:08 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-08-14 21:34:08 (GMT) |
commit | 2463f8f831bdf7ed562a26a13a6214f203f0b037 (patch) | |
tree | d0cb99f5c7ce3624a210f436117b8cfa7eb63445 /Lib/tabnanny.py | |
parent | 26a07b5198e47d7874eef14e15dee2cc0e644cb9 (diff) | |
download | cpython-2463f8f831bdf7ed562a26a13a6214f203f0b037.zip cpython-2463f8f831bdf7ed562a26a13a6214f203f0b037.tar.gz cpython-2463f8f831bdf7ed562a26a13a6214f203f0b037.tar.bz2 |
Make tabnanny recognize IndentationErrors raised by tokenize.
Add a test to test_inspect to make sure indented source
is recognized correctly. (fixes #1224621)
Diffstat (limited to 'Lib/tabnanny.py')
-rwxr-xr-x | Lib/tabnanny.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/tabnanny.py b/Lib/tabnanny.py index f38a79f..76665ac 100755 --- a/Lib/tabnanny.py +++ b/Lib/tabnanny.py @@ -109,6 +109,10 @@ def check(file): errprint("%r: Token Error: %s" % (file, msg)) return + except IndentationError, msg: + errprint("%r: Indentation Error: %s" % (file, msg)) + return + except NannyNag, nag: badline = nag.get_lineno() line = nag.get_line() |