Skip to content

Commit

Permalink
Work around list mutability (#1887)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jul 11, 2015
1 parent f390f36 commit afdda51
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions nikola/nikola.py
Expand Up @@ -1567,7 +1567,7 @@ def generic_page_renderer(self, lang, post, filters):

task = {
'name': os.path.normpath(output_name),
'file_dep': deps,
'file_dep': sorted(deps),

This comment has been minimized.

Copy link
@felixfontein

felixfontein Jul 11, 2015

Contributor

I don't think the sorted() is necessary.

This comment has been minimized.

Copy link
@Kwpolska

Kwpolska Jul 11, 2015

Author Member

Better safe than sorry.

'targets': [output_name],
'actions': [(self.render_template, [post.template_name,
output_name, context])],
Expand All @@ -1581,7 +1581,8 @@ def generic_post_list_renderer(self, lang, posts, output_name,
template_name, filters, extra_context):
"""Renders pages with lists of posts."""

deps = self.template_system.template_deps(template_name)
deps = []
deps += self.template_system.template_deps(template_name)
uptodate_deps = []
for post in posts:
deps += post.deps(lang)
Expand Down Expand Up @@ -1610,7 +1611,7 @@ def generic_post_list_renderer(self, lang, posts, output_name,
task = {
'name': os.path.normpath(output_name),
'targets': [output_name],
'file_dep': deps,
'file_dep': sorted(deps),
'actions': [(self.render_template, [template_name, output_name,
context])],
'clean': True,
Expand Down

0 comments on commit afdda51

Please sign in to comment.