summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1999-07-23 15:04:05 (GMT)
committerFred Drake <fdrake@acm.org>1999-07-23 15:04:05 (GMT)
commit69f87c580de14e2baeba99033cf4106fe6ead821 (patch)
tree9d0f7ff3458154ae1c79112b6d52bdef1d2b5618
parentde5d5ce7bcadcceafc3cb847315140d7d473b704 (diff)
downloadcpython-69f87c580de14e2baeba99033cf4106fe6ead821.zip
cpython-69f87c580de14e2baeba99033cf4106fe6ead821.tar.gz
cpython-69f87c580de14e2baeba99033cf4106fe6ead821.tar.bz2
getsize(), getatime(), getmtime():
Constants from stat module were imported using "import *"; don't access them via stat.ST_*! Reported by that other vR. ;-)
-rw-r--r--Lib/macpath.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/macpath.py b/Lib/macpath.py
index b19d5a1..bd016d8 100644
--- a/Lib/macpath.py
+++ b/Lib/macpath.py
@@ -104,17 +104,17 @@ def isdir(s):
def getsize(filename):
"""Return the size of a file, reported by os.stat()."""
st = os.stat(filename)
- return st[stat.ST_SIZE]
+ return st[ST_SIZE]
def getmtime(filename):
"""Return the last modification time of a file, reported by os.stat()."""
st = os.stat(filename)
- return st[stat.ST_MTIME]
+ return st[ST_MTIME]
def getatime(filename):
"""Return the last access time of a file, reported by os.stat()."""
st = os.stat(filename)
- return st[stat.ST_MTIME]
+ return st[ST_MTIME]
# Return true if the pathname refers to a symbolic link.