summaryrefslogtreecommitdiffstats
path: root/Doc/library/os.rst
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-10-12 18:10:51 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-10-12 18:10:51 (GMT)
commit62ab10a05acdc8bb45549e4df6fd6fb5f4623aab (patch)
treeaa9923e821b0171ac71d11f9e8414fc594fcb61c /Doc/library/os.rst
parent5d6fbe82078fe67437755bccfa504dbbcf909a74 (diff)
downloadcpython-62ab10a05acdc8bb45549e4df6fd6fb5f4623aab.zip
cpython-62ab10a05acdc8bb45549e4df6fd6fb5f4623aab.tar.gz
cpython-62ab10a05acdc8bb45549e4df6fd6fb5f4623aab.tar.bz2
Replace mentions of IOError
Diffstat (limited to 'Doc/library/os.rst')
-rw-r--r--Doc/library/os.rst7
1 files changed, 2 insertions, 5 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 636ac24..9190775 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -1426,11 +1426,8 @@ Files and Directories
try:
fp = open("myfile")
- except IOError as e:
- if e.errno == errno.EACCESS:
- return "some default data"
- # Not a permission error.
- raise
+ except PermissionError:
+ return "some default data"
else:
with fp:
return fp.read()