From 283a8b9c9ff1d86ec5427516f8d161d8868ca3eb Mon Sep 17 00:00:00 2001 From: David Cantrell Date: Tue, 3 Dec 2019 16:39:50 -0500 Subject: [PATCH] Remove rsync_excludes.txt.jinja2, just make it a string. (#2659) No need to have this file be a template. It can just be written out as a string. --- pelican/tools/pelican_quickstart.py | 10 ++++++++-- pelican/tools/templates/rsync_excludes.txt.jinja2 | 4 ---- 2 files changed, 8 insertions(+), 6 deletions(-) delete mode 100644 pelican/tools/templates/rsync_excludes.txt.jinja2 diff --git a/pelican/tools/pelican_quickstart.py b/pelican/tools/pelican_quickstart.py index 134b16fb..7ff3c67a 100755 --- a/pelican/tools/pelican_quickstart.py +++ b/pelican/tools/pelican_quickstart.py @@ -86,6 +86,13 @@ class _DEFAULT_PATH_TYPE(str): # noqa: SLOT000 _DEFAULT_PATH = _DEFAULT_PATH_TYPE(os.curdir) +RSYNC_EXCLUDES = """\ +# Files to exclude with rsync(1) during publishing. +# See the INCLUDE/EXCLUDE PATTERN RULES section of the rsync man page. + +.DS_Store +""" + def ask(question, answer=str, default=None, length=None): if answer is str: r = "" @@ -411,8 +418,7 @@ needed by Pelican. try: with open(os.path.join(CONF['basedir'], 'rsync_excludes.txt'), 'w', 'utf-8') as fd: - _template = _jinja_env.get_template('rsync_excludes.txt.jinja2') - fd.write(_template.render(**CONF)) + fd.write(RSYNC_EXCLUDES) fd.close() except OSError as e: print('Error: {0}'.format(e)) diff --git a/pelican/tools/templates/rsync_excludes.txt.jinja2 b/pelican/tools/templates/rsync_excludes.txt.jinja2 deleted file mode 100644 index fbf831ca..00000000 --- a/pelican/tools/templates/rsync_excludes.txt.jinja2 +++ /dev/null @@ -1,4 +0,0 @@ -# Files to exclude with rsync(1) during publishing. -# See the INCLUDE/EXCLUDE PATTERN RULES section of the rsync man page. - -.DS_Store