diff options
Diffstat (limited to 'Lib/token.py')
-rwxr-xr-x | Lib/token.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/token.py b/Lib/token.py index 2770cfd..477827ac 100755 --- a/Lib/token.py +++ b/Lib/token.py @@ -93,7 +93,7 @@ def main(): outFileName = args[1] try: fp = open(inFileName) - except IOError, err: + except IOError as err: sys.stdout.write("I/O error: %s\n" % str(err)) sys.exit(1) lines = fp.read().split("\n") @@ -113,7 +113,7 @@ def main(): # load the output skeleton from the target: try: fp = open(outFileName) - except IOError, err: + except IOError as err: sys.stderr.write("I/O error: %s\n" % str(err)) sys.exit(2) format = fp.read().split("\n") @@ -130,7 +130,7 @@ def main(): format[start:end] = lines try: fp = open(outFileName, 'w') - except IOError, err: + except IOError as err: sys.stderr.write("I/O error: %s\n" % str(err)) sys.exit(4) fp.write("\n".join(format)) |