summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial/errors.rst
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2014-03-31 22:13:30 (GMT)
committerAndrew Svetlov <andrew.svetlov@gmail.com>2014-03-31 22:13:30 (GMT)
commit08af00047bb9266bfb6e1cfc539affd130b47170 (patch)
treedf8377d6570466219cf5d45bcee7eab05cf97cb0 /Doc/tutorial/errors.rst
parent5898d4f4d917c0f3e63f0a10d01ad445afa10b74 (diff)
downloadcpython-08af00047bb9266bfb6e1cfc539affd130b47170.zip
cpython-08af00047bb9266bfb6e1cfc539affd130b47170.tar.gz
cpython-08af00047bb9266bfb6e1cfc539affd130b47170.tar.bz2
Get rid of deprecated IOError in the doc
Diffstat (limited to 'Doc/tutorial/errors.rst')
-rw-r--r--Doc/tutorial/errors.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst
index 4282151..d048ae9 100644
--- a/Doc/tutorial/errors.rst
+++ b/Doc/tutorial/errors.rst
@@ -131,8 +131,8 @@ the exception (allowing a caller to handle the exception as well)::
f = open('myfile.txt')
s = f.readline()
i = int(s.strip())
- except IOError as err:
- print("I/O error: {0}".format(err))
+ except OSError as err:
+ print("OS error: {0}".format(err))
except ValueError:
print("Could not convert data to an integer.")
except: