[Python-checkins] cpython (merge 3.6 -> default): Closes #28713 uses OSError in the tutorial
kushal.das
python-checkins at python.org
Wed Nov 16 10:49:32 EST 2016
https://hg.python.org/cpython/rev/15e5e476e4a1
changeset: 105158:15e5e476e4a1
parent: 105156:ba14f8b61bd8
parent: 105157:3375c111d1ff
user: Kushal Das <kushaldas at gmail.com>
date: Wed Nov 16 21:17:54 2016 +0530
summary:
Closes #28713 uses OSError in the tutorial
files:
Doc/tutorial/errors.rst | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst
--- a/Doc/tutorial/errors.rst
+++ b/Doc/tutorial/errors.rst
@@ -174,7 +174,7 @@
for arg in sys.argv[1:]:
try:
f = open(arg, 'r')
- except IOError:
+ except OSError:
print('cannot open', arg)
else:
print(arg, 'has', len(f.readlines()), 'lines')
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list