| commit | 470e7617a999b4ed1ac0118798a07fe7a5ff883c | [log] [tgz] |
|---|---|---|
| author | Guido van Rossum <guido@python.org> | Thu Dec 26 13:05:43 1991 +0000 |
| committer | Guido van Rossum <guido@python.org> | Thu Dec 26 13:05:43 1991 +0000 |
| tree | bab050ae69c3a4294885bdf00318239515082622 | |
| parent | aa3760d91d66011aaafbccaeef8827f76e4b4230 [diff] [blame] |
Use AttributeError.
diff --git a/Lib/posixpath.py b/Lib/posixpath.py index 7c13458..9a2ccb0 100644 --- a/Lib/posixpath.py +++ b/Lib/posixpath.py
@@ -95,7 +95,7 @@ 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])