]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use AttributeError.
authorGuido van Rossum <guido@python.org>
Thu, 26 Dec 1991 13:05:43 +0000 (13:05 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 26 Dec 1991 13:05:43 +0000 (13:05 +0000)
Lib/posixpath.py

index 7c13458b941be332e635cb09d47256ec708464d0..9a2ccb0728eade02712cb4151e67f94aabae4ba3 100644 (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])