mirror of https://github.com/python/cpython
Use AttributeError.
This commit is contained in:
parent
aa3760d91d
commit
470e7617a9
|
@ -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…
Reference in New Issue