diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-18 22:02:39 +0200 |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-18 22:02:39 +0200 |
commit | 8a2430b27c2140ed1063a623fdeef7544a4738d4 (patch) | |
tree | 2b01834ce21fb3477a356bece0a5491f94eb619f /Lib/posixpath.py | |
parent | bb8b07e988944592019eaa56716bf41c2b19a0e0 (diff) | |
download | cpython-8a2430b27c2140ed1063a623fdeef7544a4738d4.tar.gz |
Issue #16706: get rid of os.error
Diffstat (limited to 'Lib/posixpath.py')
-rw-r--r-- | Lib/posixpath.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/posixpath.py b/Lib/posixpath.py index cb937963af..eb5f45f3a9 100644 --- a/Lib/posixpath.py +++ b/Lib/posixpath.py @@ -162,7 +162,7 @@ def islink(path): """Test whether a path is a symbolic link""" try: st = os.lstat(path) - except (os.error, AttributeError): + except (OSError, AttributeError): return False return stat.S_ISLNK(st.st_mode) @@ -172,7 +172,7 @@ def lexists(path): """Test whether a path exists. Returns True for broken symbolic links""" try: os.lstat(path) - except os.error: + except OSError: return False return True @@ -220,7 +220,7 @@ def ismount(path): else: parent = join(path, '..') s2 = os.lstat(parent) - except os.error: + except OSError: return False # It doesn't exist -- so not a mount point :-) dev1 = s1.st_dev dev2 = s2.st_dev |