summaryrefslogtreecommitdiffstats
path: root/Lib/compileall.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/compileall.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/compileall.py')
-rw-r--r--Lib/compileall.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/compileall.py b/Lib/compileall.py
index 2fbc2bc..8397c96 100644
--- a/Lib/compileall.py
+++ b/Lib/compileall.py
@@ -13,7 +13,6 @@ See module py_compile for details of the actual byte-compilation.
"""
import os
-import stat
import sys
import py_compile
@@ -56,8 +55,8 @@ def compile_dir(dir, maxlevels=10, ddir=None,
head, tail = name[:-3], name[-3:]
if tail == '.py':
cfile = fullname + (__debug__ and 'c' or 'o')
- ftime = os.stat(fullname)[stat.ST_MTIME]
- try: ctime = os.stat(cfile)[stat.ST_MTIME]
+ ftime = os.stat(fullname).st_mtime
+ try: ctime = os.stat(cfile).st_mtime
except os.error: ctime = 0
if (ctime > ftime) and not force: continue
if not quiet: