Skip to content
Permalink
Browse files

Backport #3072 for v7

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
felixfontein authored and Kwpolska committed May 4, 2018
1 parent 9c5bfa0 commit 5b3191c8f2decc78e58f34ddd9a3e15fe9268d0f
Showing with 10 additions and 9 deletions.
  1. +3 −1 CHANGES.txt
  2. +3 −3 nikola/plugins/misc/scan_posts.py
  3. +4 −5 nikola/post.py
@@ -1,7 +1,9 @@
New in v7-maintenance
=====================

* Fixing behavior of RSS_PATH to do what the documentation
* Fix behavior for posts not available in default language
(Issues #2956 and #3073)
* Fix behavior of RSS_PATH to do what the documentation
says it does (Issue #3024)
* Use documented dateutil API for time zone list (Issue #3006)

@@ -84,11 +84,9 @@ def scan(self):
if not any([x.startswith('.')
for x in p.split(os.sep)])]

for base_path in full_list:
for base_path in sorted(full_list):
if base_path in seen:
continue
else:
seen.add(base_path)
try:
post = Post(
base_path,
@@ -100,6 +98,8 @@ def scan(self):
self.site.get_compiler(base_path),
destination_base=destination_translatable
)
for lang in post.translated_to:
seen.add(post.translated_source_path(lang))
timeline.append(post)
except Exception:
LOGGER.error('Error reading post {}'.format(base_path))
@@ -533,11 +533,10 @@ def _get_dependencies(self, deps_list):
def deps(self, lang):
"""Return a list of file dependencies to build this post's page."""
deps = []
if self.default_lang in self.translated_to:
deps.append(self.base_path)
deps.append(self.source_path)
if os.path.exists(self.metadata_path):
deps.append(self.metadata_path)
deps.append(self.base_path)
deps.append(self.source_path)
if os.path.exists(self.metadata_path):
deps.append(self.metadata_path)
if lang != self.default_lang:
cand_1 = get_translation_candidate(self.config, self.source_path, lang)
cand_2 = get_translation_candidate(self.config, self.base_path, lang)

0 comments on commit 5b3191c

Please sign in to comment.