Mercurial > piecrust2
diff piecrust/generation/taxonomy.py @ 736:13ec290bfc13
bake: Fix some crashes with new blog archive/taxonomy for incremental bakes.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 01 Jun 2016 22:46:11 -0700 |
parents | 606f6d57b5df |
children | 661f7ba15762 |
line wrap: on
line diff
--- a/piecrust/generation/taxonomy.py Wed Jun 01 22:24:35 2016 -0700 +++ b/piecrust/generation/taxonomy.py Wed Jun 01 22:46:11 2016 -0700 @@ -141,9 +141,11 @@ start_time = time.perf_counter() page_count = self._bakeTaxonomyTerms(ctx, all_terms, dirty_terms) - logger.info(format_timed( - start_time, - "baked %d %s pages." % (page_count, self.taxonomy.term_name))) + if page_count > 0: + logger.info(format_timed( + start_time, + "baked %d %s pages for %s." % ( + page_count, self.taxonomy.term_name, self.source_name))) def _buildDirtyTaxonomyTerms(self, ctx): # Build the list of terms for our taxonomy, and figure out which ones @@ -154,6 +156,9 @@ # Re-bake all taxonomy terms that include new or changed pages. for prev_entry, cur_entry in ctx.getBakedPageRecords(): + if cur_entry.source_name != self.source_name: + continue + entries = [cur_entry] if prev_entry: entries.append(prev_entry)