Skip to content

Commit

Permalink
Fix #2505
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed Sep 24, 2016
1 parent b7df794 commit 9b24490
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions nikola/plugins/misc/scan_posts.py
Expand Up @@ -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."""
Expand Down Expand Up @@ -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.