Commit 9ad9a5ba authored by 's avatar

fixed dev mode reloading logic

parent a8e2ba21
...@@ -112,9 +112,17 @@ class HTMLFile(DocumentTemplate.HTMLFile,MethodObject.Method,): ...@@ -112,9 +112,17 @@ class HTMLFile(DocumentTemplate.HTMLFile,MethodObject.Method,):
def __call__(self, *args, **kw): def __call__(self, *args, **kw):
if Globals.DevelopmentMode: if Globals.DevelopmentMode:
__traceback_info__=self.raw __traceback_info__=self.raw
t=os.stat(self.raw) try: mtime=os.stat(self.raw)[8]
if t != self._v_last_read: except: mtime=0
if mtime != self._v_last_read:
self.cook() self.cook()
self._v_last_read=t self._v_last_read=mtime
return apply(HTMLFile.inheritedAttribute('__call__'), return apply(HTMLFile.inheritedAttribute('__call__'),
(self,)+args[1:],kw) (self,)+args[1:],kw)
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