summaryrefslogtreecommitdiff
path: root/Lib/tabnanny.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/tabnanny.py')
-rwxr-xr-xLib/tabnanny.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/tabnanny.py b/Lib/tabnanny.py
index 76665ac91a..1d2c6db2bc 100755
--- a/Lib/tabnanny.py
+++ b/Lib/tabnanny.py
@@ -43,7 +43,7 @@ def main():
global verbose, filename_only
try:
opts, args = getopt.getopt(sys.argv[1:], "qv")
- except getopt.error, msg:
+ except getopt.error as msg:
errprint(msg)
return
for o, a in opts:
@@ -95,7 +95,7 @@ def check(file):
try:
f = open(file)
- except IOError, msg:
+ except IOError as msg:
errprint("%r: I/O Error: %s" % (file, msg))
return
@@ -105,15 +105,15 @@ def check(file):
try:
process_tokens(tokenize.generate_tokens(f.readline))
- except tokenize.TokenError, msg:
+ except tokenize.TokenError as msg:
errprint("%r: Token Error: %s" % (file, msg))
return
- except IndentationError, msg:
+ except IndentationError as msg:
errprint("%r: Indentation Error: %s" % (file, msg))
return
- except NannyNag, nag:
+ except NannyNag as nag:
badline = nag.get_lineno()
line = nag.get_line()
if verbose: