Skip to content

Commit

Permalink
fix #918
Browse files Browse the repository at this point in the history
Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Nov 17, 2013
1 parent 8fd312e commit acf132b
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions nikola/post.py
Expand Up @@ -331,10 +331,17 @@ def fragment_deps(self, lang):
with codecs.open(dep_path, 'rb+', 'utf8') as depf:
deps.extend([l.strip() for l in depf.readlines()])
if lang != self.default_lang:
lang_deps = list(filter(os.path.exists, [x + "." + lang for x in
deps]))
lang_deps = [d + "." + lang for d in deps]
deps += lang_deps
return deps
existing_deps = [d for d in deps if os.path.exists(d)]
for d in deps:
# do not warn for inexistent language-specific deps this
# would spam the user in many occassions, and was done that
# way forever. (v1.1, the earliest on GitHub, did that)
if d not in existing_deps and d not in lang_deps:
LOGGER.warning('Dependency {0} (of {1}) does not exist '
'anymore, skipping'.format(d, self.source_path))
return existing_deps

def is_translation_available(self, lang):
"""Return true if the translation actually exists."""
Expand Down

0 comments on commit acf132b

Please sign in to comment.