summaryrefslogtreecommitdiffstats
path: root/Lib/linecache.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2002-06-01 19:51:15 (GMT)
committerRaymond Hettinger <python@rcn.com>2002-06-01 19:51:15 (GMT)
commit32200aeac697fcb3f2b4528127a2fbf0a22a8f17 (patch)
treeb99f2c04d576a3699ab9a2b6dfc1fc0e31e3c734 /Lib/linecache.py
parent16e3c427f35589ac3b83e8c13a8ec6495ec6cfa1 (diff)
downloadcpython-32200aeac697fcb3f2b4528127a2fbf0a22a8f17.zip
cpython-32200aeac697fcb3f2b4528127a2fbf0a22a8f17.tar.gz
cpython-32200aeac697fcb3f2b4528127a2fbf0a22a8f17.tar.bz2
Replaced obsolete stat module constants with equivalent attributes
Diffstat (limited to 'Lib/linecache.py')
-rw-r--r--Lib/linecache.py5
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