diff Lib/macpath.py @ 11137:0a5a8f513d13 legacy-trunk

getsize(), getatime(), getmtime(): Constants from stat module were imported using "import *"; don't access them via stat.ST_*! Reported by that other vR. ;-)
author Fred Drake <fdrake@acm.org>
date Fri, 23 Jul 1999 15:04:05 +0000
parents d7979f4ed2b6
children b6f52c1ef6da
line wrap: on
line diff
--- a/Lib/macpath.py	Thu Jul 22 19:21:45 1999 +0000
+++ b/Lib/macpath.py	Fri Jul 23 15:04:05 1999 +0000
@@ -104,17 +104,17 @@
 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.