Commit 832932e5 authored by Evan Simpson's avatar Evan Simpson

Fixed bug in _cook_check()'s forced read.

parent ffaa6c69
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
Zope object encapsulating a Page Template from the filesystem. Zope object encapsulating a Page Template from the filesystem.
""" """
__version__='$Revision: 1.2 $'[11:-2] __version__='$Revision: 1.3 $'[11:-2]
import os, AccessControl, Acquisition, sys import os, AccessControl, Acquisition, sys
from Globals import package_home, DevelopmentMode from Globals import package_home, DevelopmentMode
...@@ -169,8 +169,8 @@ class PageTemplateFile(Script, PageTemplate, Traversable): ...@@ -169,8 +169,8 @@ class PageTemplateFile(Script, PageTemplate, Traversable):
__traceback_info__ = self.filename __traceback_info__ = self.filename
try: mtime=os.stat(self.filename)[8] try: mtime=os.stat(self.filename)[8]
except: mtime=0 except: mtime=0
if mtime == self._v_last_read: if hasattr(self, '_v_program') and mtime == self._v_last_read:
return return
self.pt_edit(open(self.filename), None) self.pt_edit(open(self.filename), None)
self._cook() self._cook()
if self._v_errors: if self._v_errors:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment