summaryrefslogtreecommitdiffstats
path: root/Lib/zipfile.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/zipfile.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/zipfile.py')
-rw-r--r--Lib/zipfile.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/zipfile.py b/Lib/zipfile.py
index c0a0fe5..c21be84 100644
--- a/Lib/zipfile.py
+++ b/Lib/zipfile.py
@@ -373,7 +373,7 @@ class ZipFile:
"""Put the bytes from filename into the archive under the name
arcname."""
st = os.stat(filename)
- mtime = time.localtime(st[8])
+ mtime = time.localtime(st.st_mtime)
date_time = mtime[0:6]
# Create ZipInfo instance to store file information
if arcname is None:
@@ -572,10 +572,10 @@ class PyZipFile(ZipFile):
file_pyc = pathname + ".pyc"
file_pyo = pathname + ".pyo"
if os.path.isfile(file_pyo) and \
- os.stat(file_pyo)[8] >= os.stat(file_py)[8]:
+ os.stat(file_pyo).st_mtime >= os.stat(file_py).st_mtime:
fname = file_pyo # Use .pyo file
elif not os.path.isfile(file_pyc) or \
- os.stat(file_pyc)[8] < os.stat(file_py)[8]:
+ os.stat(file_pyc).st_mtime < os.stat(file_py).st_mtime:
import py_compile
if self.debug:
print "Compiling", file_py