[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/publisher/fileresource.py avoid use of magic numbers by using the library

Fred L. Drake, Jr. fdrake at gmail.com
Fri Aug 6 15:15:09 EDT 2004


Log message for revision 26944:
  avoid use of magic numbers by using the library


Changed:
  U   Zope3/trunk/src/zope/app/publisher/fileresource.py


-=-
Modified: Zope3/trunk/src/zope/app/publisher/fileresource.py
===================================================================
--- Zope3/trunk/src/zope/app/publisher/fileresource.py	2004-08-06 19:10:25 UTC (rev 26943)
+++ Zope3/trunk/src/zope/app/publisher/fileresource.py	2004-08-06 19:15:09 UTC (rev 26944)
@@ -34,9 +34,10 @@
         f.close()
         self.content_type, enc = guess_content_type(path, data)
         self.__name__ = posixpath.basename(path)
-        self.lmt = float(os.stat(path)[8]) or time()
+        self.lmt = float(os.path.getmtime(path)) or time()
         self.lmh = rfc1123_date(self.lmt)
 
+
 class Image(File):
     """Image objects stored in external files."""
 



More information about the Zope3-Checkins mailing list