diff options
Diffstat (limited to 'Lib/linecache.py')
-rw-r--r-- | Lib/linecache.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/linecache.py b/Lib/linecache.py index 7a0859d..56b686e 100644 --- a/Lib/linecache.py +++ b/Lib/linecache.py @@ -7,7 +7,6 @@ that name. import sys import os -from stat import * __all__ = ["getline","clearcache","checkcache"] @@ -52,7 +51,7 @@ def checkcache(): except os.error: del cache[filename] continue - if size != stat[ST_SIZE] or mtime != stat[ST_MTIME]: + if size != stat.st_size or mtime != stat.st_mtime: del cache[filename] @@ -96,6 +95,6 @@ def updatecache(filename): except IOError, msg: ## print '*** Cannot open', fullname, ':', msg return [] - size, mtime = stat[ST_SIZE], stat[ST_MTIME] + size, mtime = stat.st_size, stat.st_mtime cache[filename] = size, mtime, lines, fullname return lines |