Commit db1e269f authored by Kushal Das's avatar Kushal Das

Closes #28713 uses OSError in the tutorial

parent 2726f56a
......@@ -174,7 +174,7 @@ example::
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')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment