summaryrefslogtreecommitdiffstats
path: root/Lib/token.py
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-25 14:47:37 (GMT)
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-25 14:47:37 (GMT)
commitf7a17b48d748e1835bcf9df86fb7fb318bb020f8 (patch)
tree403d91c57f72d6e538ce09a8037bd658bc619760 /Lib/token.py
parent16bdd4120d8452e8e04b124bcdd116608c5166b0 (diff)
downloadcpython-f7a17b48d748e1835bcf9df86fb7fb318bb020f8.zip
cpython-f7a17b48d748e1835bcf9df86fb7fb318bb020f8.tar.gz
cpython-f7a17b48d748e1835bcf9df86fb7fb318bb020f8.tar.bz2
Replace IOError with OSError (#16715)
Diffstat (limited to 'Lib/token.py')
-rwxr-xr-xLib/token.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/token.py b/Lib/token.py
index 31fae0a..7470c8c 100755
--- a/Lib/token.py
+++ b/Lib/token.py
@@ -93,7 +93,7 @@ def _main():
outFileName = args[1]
try:
fp = open(inFileName)
- except IOError as err:
+ except OSError as err:
sys.stdout.write("I/O error: %s\n" % str(err))
sys.exit(1)
lines = fp.read().split("\n")
@@ -112,7 +112,7 @@ def _main():
# load the output skeleton from the target:
try:
fp = open(outFileName)
- except IOError as err:
+ except OSError as err:
sys.stderr.write("I/O error: %s\n" % str(err))
sys.exit(2)
format = fp.read().split("\n")
@@ -129,7 +129,7 @@ def _main():
format[start:end] = lines
try:
fp = open(outFileName, 'w')
- except IOError as err:
+ except OSError as err:
sys.stderr.write("I/O error: %s\n" % str(err))
sys.exit(4)
fp.write("\n".join(format))