[ZPT] CVS: Zope/lib/python/Products/PageTemplates - PageTemplateFile.py:1.14.18.1
Steve Alexander
steve@cat-box.net
Thu, 18 Jul 2002 12:18:59 -0400
Update of /cvs-repository/Zope/lib/python/Products/PageTemplates
In directory cvs.zope.org:/tmp/cvs-serv23444
Modified Files:
Tag: Zope-2_7-development-branch
PageTemplateFile.py
Log Message:
Corrected unqualified except: clause.
fixed some hasattr stuff to take account of the fact that the PageTemplate
base class now gives a default value of None for _v_program.
=== Zope/lib/python/Products/PageTemplates/PageTemplateFile.py 1.14 => 1.14.18.1 ===
if self._v_last_read and not DevelopmentMode:
return
__traceback_info__ = self.filename
- try: mtime=os.stat(self.filename)[8]
- except: mtime=0
- if hasattr(self, '_v_program') and mtime == self._v_last_read:
+ try:
+ mtime = os.path.getmtime(self.filename)
+ except OSError:
+ mtime = 0
+ if self._v_program is not None and mtime == self._v_last_read:
return
self.pt_edit(open(self.filename), None)
self._cook()