summaryrefslogtreecommitdiff
path: root/Lib/py_compile.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2002-06-01 19:51:15 +0000
committerRaymond Hettinger <python@rcn.com>2002-06-01 19:51:15 +0000
commitc0b1bb6d1e60ccf5bb996982376f67f2a167b8d4 (patch)
tree19fbeeda95c0f7d860f26a2a34becdc38ea39971 /Lib/py_compile.py
parente3a032af65863e1dcfa567e5bd597206852285fa (diff)
downloadcpython-c0b1bb6d1e60ccf5bb996982376f67f2a167b8d4.tar.gz
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 ce67584991..d10c5cb9e6 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