Skip to content
Permalink
Browse files

Fixing bug.

  • Loading branch information
felixfontein committed Oct 29, 2016
1 parent 022dbec commit 3c5edb3e9f28411c1feb52aeb7b1f495ec7b1614
Showing with 3 additions and 3 deletions.
  1. +3 −3 nikola/post.py
@@ -461,10 +461,10 @@ def register_depfile(self, dep, dest=None, lang=None):
self._depfile[dest].append(dep)

@staticmethod
def write_depfile(dest, deps_list):
def write_depfile(dest, deps_list, post=None):
"""Write a depfile for a given language."""
deps_path = dest + '.dep'
if deps_list or self.compiler.use_dep_file:
if deps_list or (post.compiler.use_dep_file if post else False):
deps_list = [p for p in deps_list if p != dest] # Don't depend on yourself (#1671)
with io.open(deps_path, "w+", encoding="utf8") as deps_file:
deps_file.write('\n'.join(deps_list))
@@ -543,7 +543,7 @@ def wrap_encrypt(path, password):
self.is_two_file,
self,
lang)
Post.write_depfile(dest, self._depfile[dest])
Post.write_depfile(dest, self._depfile[dest], post=self)

signal('compiled').send({
'source': self.translated_source_path(lang),

0 comments on commit 3c5edb3

Please sign in to comment.
You can’t perform that action at this time.