diff options
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 |