Skip to content

Commit

Permalink
Avoiding random gallery rebuilds with Python 3 (fixes part of #1887).
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Jul 11, 2015
1 parent afdda51 commit 38750a9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions nikola/plugins/task/galleries.py
Expand Up @@ -25,9 +25,9 @@
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

from __future__ import unicode_literals
import io
import datetime
import glob
import io
import json
import mimetypes
import os
Expand Down Expand Up @@ -246,7 +246,7 @@ def gen_tasks(self):
'targets': [post.translated_base_path(lang)],
'file_dep': post.fragment_deps(lang),
'actions': [(post.compile, [lang])],
'uptodate': [utils.config_changed(self.kw, 'nikola.plugins.task.galleries:post')] + post.fragment_deps_uptodate(lang)
'uptodate': [utils.config_changed(self.kw.copy(), 'nikola.plugins.task.galleries:post')] + post.fragment_deps_uptodate(lang)
}
context['post'] = post
else:
Expand Down Expand Up @@ -275,7 +275,7 @@ def gen_tasks(self):
file_dep))],
'clean': True,
'uptodate': [utils.config_changed({
1: self.kw,
1: self.kw.copy(),
2: self.site.config["COMMENTS_IN_GALLERIES"],
3: context.copy(),
}, 'nikola.plugins.task.galleries:gallery')],
Expand Down Expand Up @@ -305,7 +305,7 @@ def gen_tasks(self):
))],
'clean': True,
'uptodate': [utils.config_changed({
1: self.kw,
1: self.kw.copy(),
}, 'nikola.plugins.task.galleries:rss')],
}, self.kw['filters'])

Expand Down Expand Up @@ -366,7 +366,7 @@ def create_galleries(self):
'actions': [(utils.makedirs, (output_gallery,))],
'targets': [output_gallery],
'clean': True,
'uptodate': [utils.config_changed(self.kw, 'nikola.plugins.task.galleries:mkdir')],
'uptodate': [utils.config_changed(self.kw.copy(), 'nikola.plugins.task.galleries:mkdir')],
}

def parse_index(self, gallery, input_folder, output_folder):
Expand Down Expand Up @@ -493,7 +493,7 @@ def remove_excluded_image(self, img, input_folder):
(utils.remove_file, (thumb_path,))
],
'clean': True,
'uptodate': [utils.config_changed(self.kw, 'nikola.plugins.task.galleries:clean_thumb')],
'uptodate': [utils.config_changed(self.kw.copy(), 'nikola.plugins.task.galleries:clean_thumb')],
}, self.kw['filters'])

yield utils.apply_filters({
Expand All @@ -503,7 +503,7 @@ def remove_excluded_image(self, img, input_folder):
(utils.remove_file, (img_path,))
],
'clean': True,
'uptodate': [utils.config_changed(self.kw, 'nikola.plugins.task.galleries:clean_file')],
'uptodate': [utils.config_changed(self.kw.copy(), 'nikola.plugins.task.galleries:clean_file')],
}, self.kw['filters'])

def render_gallery_index(
Expand Down

0 comments on commit 38750a9

Please sign in to comment.