aboutsummaryrefslogtreecommitdiff
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
commit4dedbf7197e679b432fd3f06d8e36a223ae78f00 (patch)
treed18cac8c4186f1f3d4279011a42c22471fa51434 /Lib/dircache.py
parentUse IOError. (diff)
downloadcpython-4dedbf7197e679b432fd3f06d8e36a223ae78f00.tar.gz
cpython-4dedbf7197e679b432fd3f06d8e36a223ae78f00.tar.bz2
cpython-4dedbf7197e679b432fd3f06d8e36a223ae78f00.zip
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 1eebbbc61d6..9cdbc70009b 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]