Shane Hathaway wrote:
os.stat() raises OSError if the file is not found, in which case mtime
should be set to 0.
Surely if the file is not found, that's an error because the
PageTemplateFile is pointing at a source file that doesn't exist.
I cannot think of any reason I'd want not to be
Shane Hathaway wrote:
I vaguely recall having a similar discussion with someone regarding
DTMLFile, and we decided it had to ignore missing files, but I don't
remember why.
Darn... that'll be just the reason I'm looking for!
Also, the open() call just below that line will raise an
My guess would be that it would get an OSError possible IndexError, but I'm
not sure the logic in just setting the mtime to null and continuing.
especially since it will likely just try and fail to open the file a few
lines later...
This could actually be simplified to:
try:
mtime =
Steve Alexander wrote:
Shane Hathaway wrote:
os.stat() raises OSError if the file is not found, in which case mtime
should be set to 0.
Surely if the file is not found, that's an error because the
PageTemplateFile is pointing at a source file that doesn't exist.
I cannot think of
Steve Alexander wrote:
lib/python/Products/PageTemplateFile.py, line 110, method _cook_check
try:mtime=os.stat(self.filename)[8]
except: mtime=0
I've just spent an hour or so tracking down an awkward bug in some
unit-tests. The true error was being hidden by this