From 08af00047bb9266bfb6e1cfc539affd130b47170 Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Tue, 1 Apr 2014 01:13:30 +0300 Subject: Get rid of deprecated IOError in the doc --- Doc/tutorial/errors.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Doc/tutorial/errors.rst') diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst index 4282151589..d048ae9e10 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: -- cgit v1.2.1