# HG changeset patch # User Ludovic Chabant # Date 1408686712 25200 # Node ID 9e058e2211088b690a0fde9d6d2e9867ab87ec28 # Parent 1a30e3d7ee4758a438c225f307056f25b5254128 Fix a crash when checking for timestamps on template files. diff -r 1a30e3d7ee47 -r 9e058e221108 piecrust/baking/baker.py --- 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"