diff options
| author | 2013-05-30 17:41:06 -0300 | |
|---|---|---|
| committer | 2013-05-30 17:41:06 -0300 | |
| commit | 0c4dfdec5b55b6064dccc38bbfb0a7c0699c895a (patch) | |
| tree | a6707225ccc559f7edf50ddd3fdc7fc85145c921 /nikola/plugins/task_render_sources.py | |
| parent | 8b14a1e5b2ca574fdd4fd2377567ec98a110d4b6 (diff) | |
Imported Upstream version 5.4.4
Diffstat (limited to 'nikola/plugins/task_render_sources.py')
| -rw-r--r-- | nikola/plugins/task_render_sources.py | 21 |
1 files changed, 12 insertions, 9 deletions
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', |
