diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2003-09-20 15:52:21 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2003-09-20 15:52:21 (GMT) |
commit | c6bb6c0f8c90f5f14d933b974db4c3ce2c7b296f (patch) | |
tree | 9a27b32b9463ffbd3264800ac7f138022f58f685 /Lib/dircache.py | |
parent | a64988c001d21335d47451586654702caec8aa1f (diff) | |
download | cpython-c6bb6c0f8c90f5f14d933b974db4c3ce2c7b296f.zip cpython-c6bb6c0f8c90f5f14d933b974db4c3ce2c7b296f.tar.gz cpython-c6bb6c0f8c90f5f14d933b974db4c3ce2c7b296f.tar.bz2 |
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.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Lib/dircache.py b/Lib/dircache.py index e18c7c3..78ec7fe 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 |