summaryrefslogtreecommitdiffstats
path: root/Lib/genericpath.py
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-18 20:02:39 (GMT)
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-18 20:02:39 (GMT)
commitad28c7f9dad791567afa0624acfb3ba430851965 (patch)
tree02095e5f567d6be1de31ffd858d21233b51675dd /Lib/genericpath.py
parenta19195984922ce89e7695c93b3bb45c3e0e6d732 (diff)
downloadcpython-ad28c7f9dad791567afa0624acfb3ba430851965.zip
cpython-ad28c7f9dad791567afa0624acfb3ba430851965.tar.gz
cpython-ad28c7f9dad791567afa0624acfb3ba430851965.tar.bz2
Issue #16706: get rid of os.error
Diffstat (limited to 'Lib/genericpath.py')
-rw-r--r--Lib/genericpath.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/genericpath.py b/Lib/genericpath.py
index 2174187..943fdb3 100644
--- a/Lib/genericpath.py
+++ b/Lib/genericpath.py
@@ -16,7 +16,7 @@ def exists(path):
"""Test whether a path exists. Returns False for broken symbolic links"""
try:
os.stat(path)
- except os.error:
+ except OSError:
return False
return True
@@ -27,7 +27,7 @@ def isfile(path):
"""Test whether a path is a regular file"""
try:
st = os.stat(path)
- except os.error:
+ except OSError:
return False
return stat.S_ISREG(st.st_mode)
@@ -39,7 +39,7 @@ def isdir(s):
"""Return true if the pathname refers to an existing directory."""
try:
st = os.stat(s)
- except os.error:
+ except OSError:
return False
return stat.S_ISDIR(st.st_mode)