mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #16706: get rid of os.error
This commit is contained in:
parent
a191959849
commit
ad28c7f9da
33 changed files with 4089 additions and 4123 deletions
|
@ -321,7 +321,7 @@ def islink(path):
|
|||
"""
|
||||
try:
|
||||
st = os.lstat(path)
|
||||
except (os.error, AttributeError):
|
||||
except (OSError, AttributeError):
|
||||
return False
|
||||
return stat.S_ISLNK(st.st_mode)
|
||||
|
||||
|
@ -331,7 +331,7 @@ def lexists(path):
|
|||
"""Test whether a path exists. Returns True for broken symbolic links"""
|
||||
try:
|
||||
st = os.lstat(path)
|
||||
except (os.error, WindowsError):
|
||||
except (OSError, WindowsError):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue