Skip to content

Commit

Permalink
Fixing bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Oct 29, 2016
1 parent 022dbec commit 3c5edb3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nikola/post.py
Expand Up @@ -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))
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit 3c5edb3

Please sign in to comment.