Commit 20332bdd authored by Guido van Rossum's avatar Guido van Rossum

Use AttributeError.

parent 4d08da6d
...@@ -95,7 +95,7 @@ def isdir(path): ...@@ -95,7 +95,7 @@ def isdir(path):
def islink(path): def islink(path):
try: try:
st = posix.lstat(path) st = posix.lstat(path)
except (posix.error, NameError): except (posix.error, AttributeError):
return 0 return 0
return stat.S_ISLNK(st[stat.ST_MODE]) return stat.S_ISLNK(st[stat.ST_MODE])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment