mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Use AttributeError.
This commit is contained in:
parent
aa3760d91d
commit
470e7617a9
1 changed files with 1 additions and 1 deletions
|
@ -95,7 +95,7 @@ def isdir(path):
|
|||
def islink(path):
|
||||
try:
|
||||
st = posix.lstat(path)
|
||||
except (posix.error, NameError):
|
||||
except (posix.error, AttributeError):
|
||||
return 0
|
||||
return stat.S_ISLNK(st[stat.ST_MODE])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue