Mercurial > piecrust2
diff piecrust/baking/baker.py @ 42:9e058e221108
Fix a crash when checking for timestamps on template files.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 21 Aug 2014 22:51:52 -0700 |
parents | 2f717f961996 |
children | efd0d3bacc9e |
line wrap: on
line diff
--- a/piecrust/baking/baker.py Thu Aug 21 22:29:03 2014 -0700 +++ b/piecrust/baking/baker.py Thu Aug 21 22:51:52 2014 -0700 @@ -320,9 +320,10 @@ # better just force a bake from scratch if that's the case. max_time = 0 for d in self.app.templates_dirs: - for _, __, filenames in os.walk(d): + for dpath, _, filenames in os.walk(d): for fn in filenames: - max_time = max(max_time, os.path.getmtime(fn)) + full_fn = os.path.join(dpath, fn) + max_time = max(max_time, os.path.getmtime(full_fn)) if max_time >= record.previous.bake_time: reason = "templates modified"