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
This could actually be simplified to:
mtime = os.path.getmtime(self.filename)
mtime = 0
On Wednesday 17 July 2002 07:08 pm, Steve Alexander wrote:
> lib/python/Products/PageTemplateFile.py, line 110, method _cook_check
> try: mtime=os.stat(self.filename)
> 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 bare except.
> I'd change it, and commit the change, except that I don't know what it
> is supposed to be catching. Any hints?
> Actually, I'd rather just remove the try: except: and let os.stat fail
> if it is going to fail. Any objections?
> (of course there will be... even bare excepts were put there for some
> Steve Alexander
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -