summaryrefslogtreecommitdiffstats
path: root/Lib/py_compile.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/py_compile.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/py_compile.py')
-rw-r--r--Lib/py_compile.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/py_compile.py b/Lib/py_compile.py
index ce67584..d10c5cb 100644
--- a/Lib/py_compile.py
+++ b/Lib/py_compile.py
@@ -46,9 +46,9 @@ def compile(file, cfile=None, dfile=None):
import os, marshal, __builtin__
f = open(file, 'U')
try:
- timestamp = long(os.fstat(f.fileno())[8])
+ timestamp = long(os.fstat(f.fileno()).st_mtime)
except AttributeError:
- timestamp = long(os.stat(file)[8])
+ timestamp = long(os.stat(file).st_mtime)
codestring = f.read()
# If parsing from a string, line breaks are \n (see parsetok.c:tok_nextc)
# Replace will return original string if pattern is not found, so