From 0c4dfdec5b55b6064dccc38bbfb0a7c0699c895a Mon Sep 17 00:00:00 2001 From: Agustin Henze Date: Thu, 30 May 2013 17:41:06 -0300 Subject: Imported Upstream version 5.4.4 --- nikola/plugins/task_render_sources.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'nikola/plugins/task_render_sources.py') diff --git a/nikola/plugins/task_render_sources.py b/nikola/plugins/task_render_sources.py index 529e68e..392345c 100644 --- a/nikola/plugins/task_render_sources.py +++ b/nikola/plugins/task_render_sources.py @@ -53,6 +53,8 @@ class Sources(Task): flag = False for lang in kw["translations"]: for post in self.site.timeline: + if post.meta('password'): + continue output_name = os.path.join( kw['output_folder'], post.destination_path( lang, post.source_ext())) @@ -63,15 +65,16 @@ class Sources(Task): source_lang = source + '.' + lang if os.path.exists(source_lang): source = source_lang - yield { - 'basename': 'render_sources', - 'name': output_name.encode('utf8'), - 'file_dep': [source], - 'targets': [output_name], - 'actions': [(utils.copy_file, (source, output_name))], - 'clean': True, - 'uptodate': [utils.config_changed(kw)], - } + if os.path.isfile(source): + yield { + 'basename': 'render_sources', + 'name': os.path.normpath(output_name), + 'file_dep': [source], + 'targets': [output_name], + 'actions': [(utils.copy_file, (source, output_name))], + 'clean': True, + 'uptodate': [utils.config_changed(kw)], + } if flag is False: # No page rendered, yield a dummy task yield { 'basename': 'render_sources', -- cgit v1.2.3