# HG changeset patch # User Jeff Hammel # Date 1366093839 25200 # Node ID 1892ac35e9c8520cbf31ecfc116aa870bcf678b1 # Parent 7db9d9b82a06ffede9f983b40972f1b0e3299076 ??? diff -r 7db9d9b82a06 -r 1892ac35e9c8 decoupage/web.py --- a/decoupage/web.py Sun Dec 30 19:59:27 2012 -0800 +++ b/decoupage/web.py Mon Apr 15 23:30:39 2013 -0700 @@ -243,7 +243,21 @@ filetype = 'file' if os.path.isdir(filepath): filetype = 'directory' - modified = os.path.getmtime(filepath) + try: + modified = os.path.getmtime(filepath) + except OSError: + # the file (mysteriously) may not exist by this time(!) + # File "/home/jhammel/web/src/decoupage/decoupage/web.py", line 114, in __call__ + # res = self.get(request) + # File "/home/jhammel/web/src/decoupage/decoupage/web.py", line 162, in get + # files = self.filedata(path, directory, conf) + # File "/home/jhammel/web/src/decoupage/decoupage/web.py", line 246, in filedata + # modified = os.path.getmtime(filepath) + # File "/home/jhammel/web/lib/python2.6/genericpath.py", line 54, in getmtime + # return os.stat(filename).st_mtime + # OSError: [Errno 2] No such file or directory: '/home/jhammel/web/site/portfolio/ideas/.#index.ini' + continue # wt{h,f}??? + modified = datetime.fromtimestamp(modified) data = {'path' : '%s/%s' % (path.rstrip('/'), i), 'name': i,