Closes #28713 uses OSError in the tutorial
diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst
index 759588f..aba61da 100644
--- 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')