[Python-checkins] cpython (3.6): Closes #28713 uses OSError in the tutorial

kushal.das python-checkins at python.org
Wed Nov 16 10:49:30 EST 2016


https://hg.python.org/cpython/rev/3375c111d1ff
changeset:   105157:3375c111d1ff
branch:      3.6
parent:      105155:1369e51182b7
user:        Kushal Das <kushaldas at gmail.com>
date:        Wed Nov 16 21:13:43 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