From 69f87c580de14e2baeba99033cf4106fe6ead821 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Fri, 23 Jul 1999 15:04:05 +0000 Subject: getsize(), getatime(), getmtime(): Constants from stat module were imported using "import *"; don't access them via stat.ST_*! Reported by that other vR. ;-) --- Lib/macpath.py | 6 +++--- 1 file 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. -- cgit v0.12