Skip to content
Permalink
Browse files
Fix #2505
  • Loading branch information
ralsina committed Sep 24, 2016
1 parent b7df794 commit 9b24490c33660d6db21157d7cb54ee83a071c6de
Showing with 15 additions and 10 deletions.
  1. +15 −10 nikola/plugins/misc/scan_posts.py
@@ -35,6 +35,7 @@
from nikola import utils
from nikola.post import Post

LOGGER = utils.get_logger('scan_posts', utils.STDERR_HANDLER)

class ScanPosts(PostScanner):
"""Scan posts in the site."""
@@ -87,15 +88,19 @@ def scan(self):
continue
else:
seen.add(base_path)
post = Post(
base_path,
self.site.config,
dest_dir,
use_in_feeds,
self.site.MESSAGES,
template_name,
self.site.get_compiler(base_path)
)
timeline.append(post)
try:
post = Post(
base_path,
self.site.config,
dest_dir,
use_in_feeds,
self.site.MESSAGES,
template_name,
self.site.get_compiler(base_path)
)
timeline.append(post)
except Exception as err:
LOGGER.error('Error reading post {}'.format(base_path))
raise err

return timeline

0 comments on commit 9b24490

Please sign in to comment.