gh-120495: Fix incorrect exception handling in Tab Nanny (#120498)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
This commit is contained in:
Wulian233 2024-06-15 19:04:14 +08:00 committed by GitHub
parent 42ebdd83bb
commit c501261c91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 7 additions and 5 deletions

View file

@ -105,14 +105,14 @@ def check(file):
errprint("%r: Token Error: %s" % (file, msg))
return
except SyntaxError as msg:
errprint("%r: Token Error: %s" % (file, msg))
return
except IndentationError as msg:
errprint("%r: Indentation Error: %s" % (file, msg))
return
except SyntaxError as msg:
errprint("%r: Syntax Error: %s" % (file, msg))
return
except NannyNag as nag:
badline = nag.get_lineno()
line = nag.get_line()