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.
This commit is contained in:
David Cantrell 2019-12-03 16:39:50 -05:00 committed by David Cantrell
commit 283a8b9c9f
2 changed files with 8 additions and 6 deletions

View file

@ -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))

View file

@ -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