summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial/errors.rst
diff options
context:
space:
mode:
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 fa2d422..5c652a9 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 e:
- print("I/O error(%s): %s" % (e.errno, e.strerror))
+ except IOError as (errno, strerror):
+ print "I/O error(%s): %s" % (errno, strerror)
except ValueError:
print("Could not convert data to an integer.")
except: