Use AttributeError.

This commit is contained in:
Guido van Rossum 1991-12-26 13:05:43 +00:00
parent aa3760d91d
commit 470e7617a9
1 changed files with 1 additions and 1 deletions

View File

@ -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])