summaryrefslogtreecommitdiff
path: root/Lib/dircache.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2003-09-20 15:52:21 +0000
committerMartin v. Löwis <martin@v.loewis.de>2003-09-20 15:52:21 +0000
commitc6bb6c0f8c90f5f14d933b974db4c3ce2c7b296f (patch)
tree9a27b32b9463ffbd3264800ac7f138022f58f685 /Lib/dircache.py
parenta64988c001d21335d47451586654702caec8aa1f (diff)
downloadcpython-git-c6bb6c0f8c90f5f14d933b974db4c3ce2c7b296f.tar.gz
Patch #707167: Pass dircache exceptions to the caller. Fixes #682813.
Not backported because of behaviour change.
Diffstat (limited to 'Lib/dircache.py')
-rw-r--r--Lib/dircache.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/Lib/dircache.py b/Lib/dircache.py
index e18c7c37a4..78ec7fe0f4 100644
--- a/Lib/dircache.py
+++ b/Lib/dircache.py
@@ -22,15 +22,9 @@ def listdir(path):
del cache[path]
except KeyError:
cached_mtime, list = -1, []
- try:
- mtime = os.stat(path).st_mtime
- except os.error:
- return []
+ mtime = os.stat(path).st_mtime
if mtime != cached_mtime:
- try:
- list = os.listdir(path)
- except os.error:
- return []
+ list = os.listdir(path)
list.sort()
cache[path] = mtime, list
return list