Skip to content

Commit ecbca35

Browse files
committed
Closes #28713 uses OSError in the tutorial
1 parent df66b9c commit ecbca35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/tutorial/errors.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ example::
174174
for arg in sys.argv[1:]:
175175
try:
176176
f = open(arg, 'r')
177-
except IOError:
177+
except OSError:
178178
print('cannot open', arg)
179179
else:
180180
print(arg, 'has', len(f.readlines()), 'lines')

0 commit comments

Comments
 (0)