diff options
author | Guido van Rossum <guido@python.org> | 1991-12-26 13:03:14 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1991-12-26 13:03:14 +0000 |
commit | a79423c1dfaed943d1a852f5f16f24e5bd1281ae (patch) | |
tree | d18cac8c4186f1f3d4279011a42c22471fa51434 /Lib/dircache.py | |
parent | 7b96c597a21df0d271e2115c4332c1d4068ced6f (diff) | |
download | cpython-a79423c1dfaed943d1a852f5f16f24e5bd1281ae.tar.gz |
Use KeyError.
Diffstat (limited to 'Lib/dircache.py')
-rw-r--r-- | Lib/dircache.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/dircache.py b/Lib/dircache.py index 1eebbbc61d..9cdbc70009 100644 --- a/Lib/dircache.py +++ b/Lib/dircache.py @@ -13,7 +13,7 @@ def listdir(path): # List directory contents, using cache try: cached_mtime, list = cache[path] del cache[path] - except RuntimeError: + except KeyError: cached_mtime, list = -1, [] try: mtime = posix.stat(path)[8] |