mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Manual pass on sources for better standards.
This commit is contained in:
parent
20662c2a43
commit
519dcdbcb3
9 changed files with 136 additions and 105 deletions
|
|
@ -78,11 +78,11 @@ class Writer(object):
|
|||
os.makedirs(os.path.dirname(complete_path))
|
||||
except Exception:
|
||||
pass
|
||||
fp = open(complete_path, 'w', encoding='utf-8' if six.PY3 else None)
|
||||
feed.write(fp, 'utf-8')
|
||||
logger.info('writing %s' % complete_path)
|
||||
|
||||
fp.close()
|
||||
encoding = 'utf-8' if six.PY3 else None
|
||||
with open(complete_path, 'w', encoding=encoding) as fp:
|
||||
feed.write(fp, 'utf-8')
|
||||
logger.info('writing %s' % complete_path)
|
||||
return feed
|
||||
finally:
|
||||
locale.setlocale(locale.LC_ALL, old_locale)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue