Mercurial > piecrust2
diff piecrust/processing/base.py @ 39:2f717f961996
Better error reporting and cache validation.
Fix the processor pipeline in the preview server.
Move the `pages` route to first position.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 21 Aug 2014 22:28:22 -0700 |
parents | 485682a6de50 |
children | 45828c4167ad |
line wrap: on
line diff
--- a/piecrust/processing/base.py Thu Aug 21 10:56:17 2014 -0700 +++ b/piecrust/processing/base.py Thu Aug 21 22:28:22 2014 -0700 @@ -115,12 +115,18 @@ class ProcessorPipelineRecordEntry(object): - def __init__(self, rel_input, is_processed=False, is_overridden=False): + def __init__(self, base_dir, rel_input, is_processed=False, + is_overridden=False): + self.base_dir = base_dir self.rel_input = rel_input self.rel_outputs = [] self.is_processed = is_processed self.is_overridden = is_overridden + @property + def path(self): + return os.path.join(self.base_dir, self.rel_input) + class ProcessingContext(object): def __init__(self, base_dir, job_queue, record=None): @@ -284,7 +290,8 @@ # This can happen if a theme file (processed via a mount point) # is overridden in the user's website. if record.hasOverrideEntry(rel_path): - record.addEntry(ProcessorPipelineRecordEntry(rel_path, + record.addEntry(ProcessorPipelineRecordEntry( + job.base_dir, rel_path, is_processed=False, is_overridden=True)) logger.info(format_timed(start_time, '%s [not baked, overridden]' % rel_path)) @@ -294,7 +301,7 @@ tree_root = builder.build(rel_path) print_node(tree_root, recursive=True) leaves = tree_root.getLeaves() - fi = ProcessorPipelineRecordEntry(rel_path) + fi = ProcessorPipelineRecordEntry(job.base_dir, rel_path) fi.rel_outputs = [l.path for l in leaves] record.addEntry(fi)