summaryrefslogtreecommitdiff
path: root/Lib/dircache.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1991-12-26 13:03:14 +0000
committerGuido van Rossum <guido@python.org>1991-12-26 13:03:14 +0000
commita79423c1dfaed943d1a852f5f16f24e5bd1281ae (patch)
treed18cac8c4186f1f3d4279011a42c22471fa51434 /Lib/dircache.py
parent7b96c597a21df0d271e2115c4332c1d4068ced6f (diff)
downloadcpython-a79423c1dfaed943d1a852f5f16f24e5bd1281ae.tar.gz
Use KeyError.
Diffstat (limited to 'Lib/dircache.py')
-rw-r--r--Lib/dircache.py2
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]