mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Merge pull request #2705 from nikolausschueler/encodingfix
Make encoding a named parameter
This commit is contained in:
commit
6b6ef5f18f
1 changed files with 4 additions and 4 deletions
|
|
@ -309,7 +309,7 @@ needed by Pelican.
|
|||
|
||||
try:
|
||||
with open(os.path.join(CONF['basedir'], 'pelicanconf.py'),
|
||||
'w', 'utf-8') as fd:
|
||||
'w', encoding='utf-8') as fd:
|
||||
conf_python = dict()
|
||||
for key, value in CONF.items():
|
||||
conf_python[key] = repr(value)
|
||||
|
|
@ -322,7 +322,7 @@ needed by Pelican.
|
|||
|
||||
try:
|
||||
with open(os.path.join(CONF['basedir'], 'publishconf.py'),
|
||||
'w', 'utf-8') as fd:
|
||||
'w', encoding='utf-8') as fd:
|
||||
_template = _jinja_env.get_template('publishconf.py.jinja2')
|
||||
fd.write(_template.render(**CONF))
|
||||
fd.close()
|
||||
|
|
@ -332,7 +332,7 @@ needed by Pelican.
|
|||
if automation:
|
||||
try:
|
||||
with open(os.path.join(CONF['basedir'], 'tasks.py'),
|
||||
'w', 'utf-8') as fd:
|
||||
'w', encoding='utf-8') as fd:
|
||||
_template = _jinja_env.get_template('tasks.py.jinja2')
|
||||
fd.write(_template.render(**CONF))
|
||||
fd.close()
|
||||
|
|
@ -340,7 +340,7 @@ needed by Pelican.
|
|||
print('Error: {0}'.format(e))
|
||||
try:
|
||||
with open(os.path.join(CONF['basedir'], 'Makefile'),
|
||||
'w', 'utf-8') as fd:
|
||||
'w', encoding='utf-8') as fd:
|
||||
py_v = 'python3'
|
||||
_template = _jinja_env.get_template('Makefile.jinja2')
|
||||
fd.write(_template.render(py_v=py_v, **CONF))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue